This issue has been created
There is 1 update.
 
 
XWiki Platform / cid:jira-generated-image-avatar-5b471c33-75c9-4d46-af25-16e338210140 XWIKI-24567 Open

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

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-1479c57e-5656-4d08-ab55-6c965cb3e6f3 Ilie Andriuta created this issue on 14/Jul/26 15:12
 
Summary: Inconsistent error messages when uploading files with restricted Mime types through drag & drop
Issue Type: cid:jira-generated-image-avatar-5b471c33-75c9-4d46-af25-16e338210140 Bug
Affects Versions: 17.10.10, 18.4.2, 18.5.0
Assignee: Unassigned
Attachments: Message_when_uploading_through_Attachments.png, Message_when_uploading_through_Drag_and_Drop.png, Message_when_uploading_through_Image_Dialog.png
Components: Old Core
Created: 14/Jul/26 15:12
Environment: Windows 11 Pro, Chrome 150, using an instance of XWiki 17.10.10 on PostgreSQL 17, Tomcat 9.0.119
Priority: cid:jira-generated-image-static-major-8da6afd7-2d27-4340-8cb9-2d255b778f25 Major
Reporter: Ilie Andriuta
Description:

Steps to reproduce

  1. Go to a page (e.g. Sandbox)
  2. Click Administer Page > Content > Attachments Restriction
  3. Under 'Allowed Mimetypes', enter "text/plain" and Save
  4. Go to Attachments tab and try to upload an image
  5. Edit the page with CKEditor (in-place or WYSIWYG) and upload an image through Image dialog (by clicking on toolbar > Image > Upload tab)
  6. While keeping the page in CKEditor edit mode, add an external image via drag & drop
  7. Observe the error messages after each upload

Expected results

In all situations, there is 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:

File successfully uploaded.

followed just below by an error message:

Error when uploading the file: it might exceed the configured maximum upload size.

which is misleading, because the real reason is the restricted Mimetype.

 
 

1 update

 
cid:jira-generated-image-avatar-1479c57e-5656-4d08-ab55-6c965cb3e6f3 Changes by Ilie Andriuta on 14/Jul/26 15:14
 
Labels: usability