filestack / filestack-js

Official Javascript SDK for the Filestack API and content ingestion system.
https://www.filestack.com
MIT License
206 stars 76 forks source link

accept pickerOption validates filename instead mime type #440

Open owagner24 opened 3 years ago

owagner24 commented 3 years ago

Expected Behavior

I can upload a woff file when I add these accepted mime types to the accept pickerOptions.

"application/*", "font/*", "application/font-woff"

Current Behavior

The following error occurs:

File roboto-v27-latin-regular.woff is not an accepted file type. The accepted file types are application/*,font/*,application/font-woff

The message sounds like the name is validated instead of the mime type.

Possible Solution

Steps to Reproduce (for bugs)

  1. Open this fiddle: https://jsfiddle.net/7raeg96p/1/
  2. Click on the button
  3. Upload a woff file. I can not add one to the issue, but you can download one here: https://google-webfonts-helper.herokuapp.com/fonts/roboto?subsets=latin

Additional Screenshots

Bildschirmfoto 2021-05-18 um 08 16 42

Context

Your Environment