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

webservice/upload.php should respect max file size

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 2.1.2
    • 2.1.1, 2.2
    • Web Services
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_21_STABLE
    • s13_MDL-29036_ws_upload_master
    • 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

      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.

            dongsheng Dongsheng Cai
            dongsheng Dongsheng Cai
            Sam Hemelryk Sam Hemelryk
            Aparup Banerjee Aparup Banerjee
            Rossiani Wijaya Rossiani Wijaya
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.