Custom File Upload With file and File name

Regarding: bootsnipp.com/snippets/KAX4X

There is a little problem here, if i upload a file, i remove it and i want to upload the same image again, it doesnt work

Lilou () - 4 years ago - Reply 0


the issue for me was add "true" to clone:

$('.file-upload-input').replaceWith($('.file-upload-input').clone(true));

temalover () - 2 years ago - Reply 0


You should not clone the input but replace with "<input class="file-upload-input" type="file" onchange="readURL(this);" accept="image/*">", seems like clone dont clear the input from the precedent image.

Lilou () - 4 years ago - Reply 0


the issue for me was add "true" to clone:

$('.file-upload-input').replaceWith($('.file-upload-input').clone(true));

temalover () - 2 years ago - Reply 0