Fileupload's Mime Types Property Works Different | Community
Skip to main content
Level 2
Dec 11, 2018 11:32 AM UTC
Solved

Fileupload's Mime Types Property Works Different

Hi Community!

At our project we use Granite fileupload widget ('granite/ui/components/foundation/form/fileupload') to work with images and videos. To specify the family of assets supported to upload we use configuration's property 'mimeTypes' that is simply passes on the value to 'accept' attribute of 'input' html tag.

We use regexp as the attribute's value (say, image/.* -- HTML input accept Attribute) and it works fine for the first time, however when a user simply opens dialog again the validation blocks the dialog from submitting because it thinks that the field of the asset is empty when it's 100% still there. If we change the property to 'image' value -- everything works great.

Could you please help me find out what's wrong?

Thanks in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Dec 11, 2018 5:12 PM UTC

Checked with the cust care team. The Response was:

Recently there have been a lot of issues reported against 'granite/ui/components/foundation/form/fileupload'.  Customer can open a Daycare ticket with detailed steps on how to reproduce along with component they are using so the team can investigate further and validate. 

2 replies

smacdonald2008
smacdonald2008Accepted solution
Level 10
Dec 11, 2018 5:12 PM UTC

Checked with the cust care team. The Response was:

Recently there have been a lot of issues reported against 'granite/ui/components/foundation/form/fileupload'.  Customer can open a Daycare ticket with detailed steps on how to reproduce along with component they are using so the team can investigate further and validate. 

Translate
arunpatidar
New Participant
Dec 11, 2018 4:09 PM UTC

Hi,

can you try image/*

(image/* without . before *) make sure the property 'mimeTypes' should be multivalued.

Translate
Arun Patidar