Closed mh0625 closed 6 years ago
allowedTypes and extFilter are used for file validations when uploading.
allowedTypes : We can check type of file we are uploading. It may be an Image/PDF/Text etc. extFilter : Checks the extension of the file. We can allow files with specific extensions.
In your case you are passing both options, so you have to handle very care fully. When you pass both options, uploader will validate both file type as well as extension. If both matches then only you can upload.
allowedTypes: 'image\/jpeg|bmp|jpg|png',
extFilter: 'jpg;png;bmp',
In the above case it will check both file type and file extension. jpeg image should pass both the validation and for that you have to add .jpeg in the extFilter option as follows.
allowedTypes: 'image\/jpeg|bmp|jpg|png',
extFilter: 'jpg;png;bmp;jpeg',
Thanks for providing a very detailed response. Closing the issue for now.
when I settings:
but the image of jpeg doesn't upload;
then I settings:
the image of jpeg has upload;
then I remove extFilter settings, the image of jpeg also has upload.
so, I want to know, what different about allowedTypes and extFilter?