-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
accept attribute ignored in Firefox #486
Comments
Ok, I've partially fixxed this. I'm using the file-change listener to check the file type is equal to application/pdf. If it is not, then I won't add it to the array of files. I've discovered another strange behaviour though. It seems that the listener is not always called when a file is selected. When selecting a file twice in a row. the listener is not called the second time. |
Seems like a firefox issue: https://bugzilla.mozilla.org/show_bug.cgi?id=826185 |
Too bad Firefox is the problem here. :( When selecting thesame file multiple times though, it surely works, but it seems the listener function is only called the first time. ng-file-change="fileSelected($files, $event)" The function fileSelected() is only called the first time. It's not a big deal for me at the moment, because I can work around it. It does prevent me from implementing something which is a nice to have though. Showing a toast when the user tries to upload thesame file twice is not possible... |
This should be fixed in 3.0.0 |
The accept attribute seems to be ignored in firefox. I've tested it in Chrome and it works fine when I set it to application/pdf. I cannot select any files other than pdf files, and when I try to drop another file over the drop zone the correct class is being applied to it.
In firefox (33.1.1) however it is possible to select files other than pdf files, and they are appended to the files[] array. When dragging a file other than a pdf files over the drop zone the incorrect class is being applied, but when I drop a file other than a pdf file it is not being added.
This behaviour is also present in the demo. I can select files other than images or pdf files in the demo...
https://angular-file-upload.appspot.com/
dragging another file over the dropzone also causes the incorrect class to be applied to the dropzone in the demo.
I'm already using a file-change listener, so I'll try to fix it there.
The text was updated successfully, but these errors were encountered: