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

webservice/upload.php should respect max file size

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2
    • Fix Version/s: 2.1.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      Hide

      The easiest way to test this is using the moodle iphone app (ask me for it when you test it)

      First, to test the maxbytes setting:
      1. site admin -> Site policies -> maxbytes, set to a small value, for example, 10k
      2. pick a picture from iphone, try upload it, it should fail

      Second, test the userquota value
      1. site admin -> Site policies -> userquota, set to a small value, for example, 10k
      2. pick a picture from iphone, try upload, it should fail

      Alternative workaround for second test through the site:
      1. site admin -> Site policies -> userquota, set to a small value, for example, 10k
      2. on navigation menu, click My profile > My private file
      3. click on "Manage my private files" button.
      4. try to upload a file greater than 10k size. this should fail

      Show
      The easiest way to test this is using the moodle iphone app (ask me for it when you test it) First, to test the maxbytes setting: 1. site admin -> Site policies -> maxbytes, set to a small value, for example, 10k 2. pick a picture from iphone, try upload it, it should fail Second, test the userquota value 1. site admin -> Site policies -> userquota, set to a small value, for example, 10k 2. pick a picture from iphone, try upload, it should fail Alternative workaround for second test through the site: 1. site admin -> Site policies -> userquota, set to a small value, for example, 10k 2. on navigation menu, click My profile > My private file 3. click on "Manage my private files" button. 4. try to upload a file greater than 10k size. this should fail
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull Master Branch:
      s13_MDL-29036_ws_upload_master

      Description

      Reported by Gavin on MOBILE-108.

      reset the limit to 500k on server (Maximum uploaded file size) on the site policies

      This was Confirmed as working on UI of upload private files in webpage "Maximum size for new files: 100KB")

      Connected to site on IPhone 3GS using Wireless

      Took a video (was 10 seconds) and pressed "Use"

      It submitted and said completed.

      I confirmed that it did appear in my private files.

      When downloading the video it was 1.2 Mb which exceeds the upload limits.

      I reset the limit to 100k on server (Maximum uploaded file size) on the site policies

      Uploaded an image successfully too, which had 700kb in size.

      Is the upload ignoring the file max size?

      Is it web service or app issue? or both?

      This was on a Moodle 2.1.1 build.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    10/Oct/11