sdfgg45 sdfgg45 - 3 months ago 8
jQuery Question

How to clear the img placeholder for choose image using jQuery

I have a form with fileupload.

<input class="file" type="file" name="files[]">

I am curently cloning the input, but if a file is choosen it also clones the choosen filinput, is there a way to clear the selected image?


fieldset-content_doc: holds the formvalues


Apparently the issue is only reproducible on Firefox. But, you can simply set the value property of the element to null:

    .each(function() { this.value = null; });

See Fiddle