kartik-v / bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x/4.x./3.x with file preview, multiple selection, and more features.
http://plugins.krajee.com/file-input
Other
5.36k stars 2.4k forks source link

How to remove thumbnail for non uploaded files? (Non Ajax) #1112

Closed Asinox closed 7 years ago

Asinox commented 7 years ago

Hello, i love this plugin, but there is something that i can't figure out.

How i can add the delete button to thumbnail for non uploaded files?, i want to delete files that i don't want to upload without remove all files that are ready to upload.

The delete button is just present in files that are loaded from server.

There is a way to archieve this?

Thank you!

kartik-v commented 7 years ago

Please read the documentation and the usage modes compared.

It is clearly mentioned what is possible in Ajax and what is NOT POSSIBLE in non Ajax (simple form) submission modes.

Asinox commented 7 years ago

Thanks @kartik-v for your reply, i did it before come here (read the documentation) , and i really want the ability of remove a thumbnail/file before process the upload. I wonder why is not possible...well thanks for you amazing plugin.

kartik-v commented 7 years ago

and i really want the ability of remove a thumbnail/file before process the upload. I wonder why is not possible..

For non ajax mode (plain form submission)... what you are asking is not supported by native HTML specifications nor by browsers... you cannot edit files selected in a native file input via javascript or external code. So a short answer is you must follow the basics of web programming to ensure your application adheres to HTML5 supported norms and behavior.

The plugin mimcs whatever HTML5 support is available for native file input in the non-ajax mode.