There is 1 update, 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-02ad51ee-d397-49f5-8699-ff800a2ce384 XWIKI-24567 Open

Inconsistent error messages when uploading files with restricted Mime types through drag & drop

 
View issue   ยท   Add comment
 

1 update

 
cid:jira-generated-image-avatar-6ea5a021-2f5b-4bfb-86ec-be5d302bfc89 Changes by Ilie Andriuta on 14/Jul/26 15:32
 
Description: *Steps to reproduce*
# Go to a page (e.g. Sandbox)
# Click Administer Page > Content > Attachments Restriction
# Under 'Allowed Mimetypes', enter "text/plain" and Save
# Go to Attachments tab and try to upload an image
# Edit the page with CKEditor (in-place or WYSIWYG) and upload an image through Image dialog (by clicking on toolbar > Image > Upload tab)
# While keeping the page in CKEditor edit mode, add an external image via drag & drop
# Observe the error messages after each upload

*Expected results*

In all situations, there is
only an error message explaining that the file uploaded has an invalid Mimetype (and display the allowed Mimetypes).

*Actual results*

When uploading the image through Image Dialog and through Attachments tab, the error message is displayed as expected, but when uploading via drag & drop in the CKEditor, there is even a success message:
{noformat}
File successfully uploaded.{noformat}
followed just below by an error message:
{noformat}
Error when uploading the file: it might exceed the configured maximum upload size.{noformat}
which is misleading, because the real reason is the restricted Mimetype.
 
 

1 comment

 
cid:jira-generated-image-avatar-6ea5a021-2f5b-4bfb-86ec-be5d302bfc89 Ilie Andriuta on 14/Jul/26 15:30
 

The success message followed by the error about file size might be related to XWIKI-24469, since before the fix (tested on XWiki 18.4.1) there was only the success message.