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 () - 5 years ago - Reply 0
the issue for me was add "true" to clone:
$('.file-upload-input').replaceWith($('.file-upload-input').clone(true));
temalover () - 3 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 () - 5 years ago - Reply 0
the issue for me was add "true" to clone:
$('.file-upload-input').replaceWith($('.file-upload-input').clone(true));
temalover () - 3 years ago - Reply 0