Maximum number of attachments per message is not checked before upload

Kirby

Well-known member
Affected version
2.2.12
Steps to reproduce
  1. Set option attachmentMaxPerMessage to 10 (Default)
  2. Start a new post and select 100 large images to upload via button Attach files
Expected Result
An error message is given that too many files have been selected and the upload does not start (Preferred)
or
Only the first 10 files are uploaded and files 11-100 display error "You may only attach 10 files" immediately without attempting an upload for those files

Actual Result
XenForo tries to upload all files serially, even files 11-100 which only display the error "You may only attach 10 files" after they have been uploaded.
Trying to upload files that (almost certainly) will fail on the server side (as the limit has been reached) seems like a waste of resources for both client and server.
 
Top Bottom