[MGNLUI-6894] MimeType restriction for upload field not working under Windows Created: 04/Oct/21  Updated: 13/Jan/22  Resolved: 16/Dec/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.12
Fix Version/s: 6.2.15

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Adam Siska
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: 5.5h
Original Estimate: Not Specified

Issue Links:
Problem/Incident
causes MGNLUI-7011 Since 6.2.15 allowedMimeTypePattern i... Closed
Relates
relates to MGNLUI-6390 allowedMimeTypePattern property doesn... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Sprint: UI Maintenance 3
Story Points: 3

 Description   

Steps to reproduce

  1.  Create a dialog which contains an upload field as follows:
    form:
      properties:
        upload:
          $type: uploadField
          allowedMimeTypePattern: image/jpeg,image/gif,image/png,image/tiff
  1.  Create the component and click on the "upload" button
  2. Check that, on the dialog for selecting files, you can switch the option from "image/jpeg,image/gif,image/png,image/tiff" to ". all files"
  3. Select ". all files" option, choose a file which doesn't match the mimeType pattern and upload it

Expected results

No ". all files" is displayed or, in any case, even if the option is displayed and other file types can be selected, the upload is prevented

Actual results

No filetype restriction exists

Workaround

N/A

Development notes

  • reproduced under Windows
  • reproduced in (Ubuntu) Linux - Firefox, Chrome.


 Comments   
Comment by Roman Kovařík [ 04/Oct/21 ]

The support is implemented by browsers. What's the browser version?

Comment by Richard Uttenthaler [ 04/Oct/21 ]

Hi Roman, I get the dialog on Chrome and also on MS Edge. Both Version 94....

Comment by Roman Kovařík [ 04/Oct/21 ]

Hey ,

I've just tested it here and it looks like it there needs to be space in between

allowedMimeTypePattern: "image/*, application/pdf"

It's correct in the docu but we might emphasize this.

Thanks for heads up!

 

Comment by Richard Uttenthaler [ 15/Oct/21 ]

After this is fixed for the Browser upload dialog: is there no additional server-side check of the MIME type? 

When do I get the configured "typeAbortMessage"? Release notes for Magnolia CMS 6.2.12 :: Magnolia CMS Docs (magnolia-cms.com)

Will this work for the "upload" field in the DAM App?

Comment by Roman Kovařík [ 15/Oct/21 ]

Hi,

When do I get the configured "typeAbortMessage"?

I believe it's used for drag&drop to the upload dialog. 

Roman

Generated at Mon Feb 12 09:41:04 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.