Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HowTo exclude specificly a file type by negation #1026

Open
saburab opened this issue Sep 25, 2015 · 5 comments
Open

HowTo exclude specificly a file type by negation #1026

saburab opened this issue Sep 25, 2015 · 5 comments

Comments

@saburab
Copy link

saburab commented Sep 25, 2015

Hi,

As far as I've seen you can whitelist file-extensions with ngf-patterns and accept. Is there a possibility to blacklist file-extens or exclude them?
I'm looking for something like: ngf-pattern="'image/*,!.jpg'"
So PNGs or any image can be uploaded, but no JPGs.

Not sure if this is a bug or if I just missed it.

JsFiddle: http://jsfiddle.net/sufius/k6ahsu1n/4/

@danialfarid
Copy link
Owner

Added feature to version 7.3.9. Same syntax you mentioned here should work.

@sufius
Copy link

sufius commented Sep 29, 2015

thank you very much 👍

@guikubivan
Copy link

Is the fiddle outdated, I can drop zip and .mov files into the dropzone? I think I'm having this issue, which is how I found this issue.

@guikubivan
Copy link

This seems to fix the error I was experiencing: #1386. You can test if you use ngf-pattern="'image/*,!.psd'" for example.

@guikubivan
Copy link

@danialfarid, can you reopen this issue as the fiddle above is still not working as expected. Also tested on demo site with same incorrect behavior:
c38e2606-dfe2-11e5-9a6f-f0f2e2b839a5

@danialfarid danialfarid reopened this Mar 11, 2016
guikubivan added a commit to haikulearning/ng-file-upload that referenced this issue Apr 27, 2016
Fix validation for mix of content types and exclusions

* See danialfarid#1026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants