Moodle

Wrong maximum filesize in database activity (using picture and file field)

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Minor Minor
  • Resolution: Unresolved
  • Affects Version/s: 1.6.5
  • Fix Version/s: None
  • Labels:
    None
  • Environment:
    RedHat Linux with
    Apache 2.2.3
    MySQL 5.0.22
    PHP 5.1.6
  • Database:
    MySQL
  • Affected Branches:
    MOODLE_16_STABLE

Description

We created a database activity where users have to upload an image and a file. You can specify an maximum filesize limit for the picture field, but you can't for the file field. So we thought, the maximum filesize limit for the file field is taken from the course (there we had a limit of 20 MB). The limit for the picture is set to 1 MB.

The problem is, that the user only can upload files up to 1 MB. We took a look on the form values and figured, that there are two hidden fields called "MAX_FILE_SIZE" (really the same name???), but only one has a value -> the one for the picture field. We tried to change the value of the second field, but that solved nothing. If we changed the first one (for the picture), we could upload bigger files too. So we think it has to be a problem with the names of the two hidden fields.

This is what you get, when you look at the form values:

3 field_51_file field_51_file hidden fakevalue
4 field_51 field_51 file
5 field_51_filename field_51_filename text
6 MAX_FILE_SIZE hidden 10485760

7 field_52_file hidden fakevalue
8 field_52 field_52 file
9 field_52_filename field_52_filename text
10 MAX_FILE_SIZE hidden

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: