Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-32861

Course file upload limit is ignored when maxbytes is set to server limit

    Details

    • Testing Instructions:
      Hide

      1. Set the server maximum uploaded file size to some numeric value (A).
      2. Set the course maximum uploaded file size to some numeric value less than A (B).
      3. Attempt to upload a file with size C, where C is larger than B but smaller than A. Verify that it fails.
      4. Attempt to upload a file with size D, where D is smaller than A and B. Verify that it succeeds.
      5. Set the server maximum uploaded file size to "Server limit."
      6. Repeat steps 2 through 4.

      Show
      1. Set the server maximum uploaded file size to some numeric value (A). 2. Set the course maximum uploaded file size to some numeric value less than A (B). 3. Attempt to upload a file with size C, where C is larger than B but smaller than A. Verify that it fails. 4. Attempt to upload a file with size D, where D is smaller than A and B. Verify that it succeeds. 5. Set the server maximum uploaded file size to "Server limit." 6. Repeat steps 2 through 4.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:

      Description

      We've noticed an inconsistency with how Server and Course file upload limits interact when one is less than the other. If Server limit (maxbytes) is set to 10MB, and the Course limit to 5MB, then a 7MB file is rejected (and the message clearly mentions a form restriction and not any server limitation).

      However, let's say that maxbytes is set to "Server limit" (0), and the Course limit is still 5MB. A 7MB file will upload without any problems, ignoring the course limit.

      Observed in 2.2.1 and current master (2.3).

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    9/Jul/12