question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

allowedFileTypes not working for uppercase extensions

See original GitHub issue

I’m using Uppy.io v0.23.1 for resumeable file uploads.

As per documentation, we can limit file types through allowedFileTypes property.

Here is my code in effort to limit file uploader control to only allow MS PowerPoint files:

`var uppy = new Uppy.Core({ debug: true, autoProceed: false, restrictions: { maxFileSize: 100000,
allowedFileTypes: [‘.pptx’] } }); uppy.use(Uppy.Dashboard, { trigger: ‘.UppyModalOpenerBtn’, inline: true, target: ‘.DashboardContainer’

});`

Error: You can only upload: .pptx

Note: Setting mime type like [‘application/zip’] accepts PPTX files but it also allows ZIP files as well.

Any solution or workaround would be highly appreciated.

PS. Related post on SO.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
azazlhrcommented, Mar 11, 2019

Thanks, will upgrade to the latest release later as it would be major update from 23 to 30.

1reaction
RaghulXandercommented, Mar 27, 2019

Is it fixed in 30.x version ? I’m getting the same issue even in 0.30

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Allowed file types" are case sensitive, shouldn't be
Obviously I can just add the uppercase version as a short term fix, but I think file extensions should not be case sensitive....
Read more >
Limit file format when using <input type="file">? - html
Strictly speaking, the answer is no. A developer cannot prevent a user from uploading files of any type or extension.
Read more >
Allowed File Extensions - Forums
Hi, I am just attempting to load a bunch of images into the site I am rebuilding since the disaster. I observed that...
Read more >
Can't display uppercase file extensions
When I import image files into Adobe Lightroom, I instruct the application to apply an uppercase file extension, but WINDOWS won't display it....
Read more >
How to Change the Allowed File Types in the File Upload ...
Hi, i have the same problem with my form, i only want file-aceept="pdf,doc,docx)" and it doens aceept files with that extensions, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found