Maximum attachment file size handling is inconsistent

Kirby

Well-known member
Affected version
2.2.10
Steps to reproduce
Start a new forum post and
  1. Upload a ZIP file that is larger than the maximum allowed filesize (but not exceeding PHP upload limits)
  2. Upload a video file that is larger than the maximum allowed video filesize (but not exceeding PHP upload limits) via Attach files
  3. Insert a video file that is larger than the maximum allowed video filesize (but not exceeding PHP upload limits) via Insert video toolbar icon
Expected result
The upload does not start in any of those cases and immediate feedback is given that the file is too large to be uploaded.

Actual result
  1. The uploads starts and after it has finished an error "The uploaded file is too large" is displayed
    1661282803316.png
  2. The upload does not start and an error "The file is too large to be uploaded" is displayed
    1661282953813.png
  3. The upload starts and after it has finished an error "The uploaded file is too large" is displayed as an overlay
    1661283101291.png
 
Last edited:
Should probably also take images into account (though that is a bit more complicated due to resizing):
  • If images are not resized and the filesize exceeds the limit -> immediate error
  • If images are resized, the image dimensions do not exceed max width or height and the filesize exceeds the limit -> immediate error
  • If images are resized, the image width or height exceeds max with or height and the image pixels exceed the processing limit > immediate error
 
Top Bottom