Uploaded image for project: 'Moodle QA'
  1. Moodle QA
  2. MDLQA-13517 Moodle 3.8 QA
  3. MDLQA-14013

CLONE - Uploading file respects maximum file size

    XMLWordPrintable

    Details

      Description

      Set up:

      • You will need a file smaller than this limit (File 1), and a file larger than this limit (File 2).
      • You will need a user who does not have moodle/course:ignorefilesizelimits (User 1) and one who does (User 2).
      • You will need a course that both users can edit
      • Create an instance of the File System repository, and place both files in the directory that it points to.
      • Set post_max_size and upload_max_filesize in php.ini to something small e.g. 1M.
      1. Log in as User 1
      2. Go to a course and create a File resource.
      3. Attempt to drag-and-drop File 1 on to the Select Files file manager
      4. The file should be attached to the file manager
      5. Click on the file in the file manager and delete it.
      6. Attempt to drag-and-drop File 2 on to the Select Files file manager
      7. You should see the error message "The file File 2 is larger than the maximum size allowed."
      8. Click on the "Add..." icon in the File manager
      9. Using the Upload a file repository, attempt to upload File 1
      10. The file should be attached to the file manager
      11. Click on the file in the file manager and delete it.
      12. Click on the "Add..." icon in the File manager
      13. Using the Upload a file repository, attempt to upload File 2
      14. You should see the error message "The file you tried to upload is too large for the server to process."
      15. Using the File system repository instance you created, attempt to upload File 1
      16. The file should be attached to the file manager
      17. Click on the file in the file manager and delete it.
      18. Click on the "Add..." icon in the File manager
      19. Using the File system repository instance you created, attempt to upload File 2
      20. You should see the error message "The file is larger than the maximum size allowed."
      21. Log out
      22. Log in as User 2
      23. Go to a course and create a File resource.
      24. Attempt to drag-and-drop File 1 on to the Select Files file manager
      25. The file should be attached to the file manager
      26. Click on the file in the file manager and delete it.
      27. Attempt to drag-and-drop File 2 on to the Select Files file manager
      28. You should see the error message "The file File 2 is larger than the maximum size allowed."
      29. Click on the "Add..." icon in the File manager
      30. Using the Upload a file repository, attempt to upload File 1
      31. The file should be attached to the file manager
      32. Click on the file in the file manager and delete it.
      33. Click on the "Add..." icon in the File manager
      34. Using the Upload a file repository, attempt to upload File 2
      35. You should see the error message "The file you tried to upload is too large for the server to process."
      36. Using the File system repository instance you created, attempt to upload File 1
      37. The file should be attached to the file manager
      38. Click on the file in the file manager and delete it.
      39. Click on the "Add..." icon in the File manager
      40. Using the File system repository instance you created, attempt to upload File 2
      41. The file should be attached to the file manager

        Attachments

        1. boost.png
          boost.png
          132 kB
        2. classic.png
          classic.png
          139 kB

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: