Multi extension file upload Issue (like - .jpg,.png,.docx,.txt,.xls, etc.)

I need to upload different extension files in my bootstrap modal, but my plugin code is accepting only Images, is there any way to upload different extension files like .jpg,.png,.docx,.txt,.xls, etc.

and in modal there should be thumbnail of chosen file should appear.

please have a look and let me know any way to overcome from this problem.


Line 7 of your html code, the input for the first box, ends in :


which is what I imagine is limiting the upload choices. The second one on line 10 ends in accept="video/*". Maybe if you change those, it will make a difference?

nope its not working to change attribute accept=“”, because JQuery Code is written specially for Image and for Video, we need to add the code for other extensions.

Thanks for your time and reply…

I see, the JS code checks to see whether the file uploaded was an image, and if not, it presumes it must be a video, so if you remove the accept conditions, it’ll upload one but think it’s a video file. You could just extend / duplicate that code to deal with different file upload types, though it does seem that there would be quite a lot of duplication that way.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.