flatpressblog / flatpress

FlatPress is a lightweight, easy-to-set-up flat-file blogging engine.
https://flatpress.org
GNU General Public License v2.0
185 stars 57 forks source link

Forbidden file type prevents the upload of allowed file types #154

Open Fraenkiman opened 2 years ago

Fraenkiman commented 2 years ago

Hello, everyone,

When testing issue #152, the following was noticed: If the uploader of a mixed file type selection contains a non-permitted file type, the subsequent permitted file types will also not be uploaded. There was also no "negative message" displayed; in the sense: "File(s) uploaded, but an error occurred." I tested the following file type order: .png, .gif, .jpg, .php, .zip, rar, .mp4 and .avi As a result, .zip, rar, .mp4 and .avi were not uploaded. The same behavior if a .png, .gif and *.jpg file type follows the non-permitted file.

So that the error list does not have to be expanded unnecessarily, I recommend displaying a negative message. This encourages the user to check the uploaded files.

The second option would be - with more work - to upload all permitted files despite the illegal file type.

Option three would be to include a newly defined error in the error list; as in: "File(s) uploaded, but an error occurred." This signals the user that although the upload of some files was successful, something went wrong.

Best Regards Frank