Skip to content Skip to sidebar Skip to footer

How Do I Delete An Image From A File Input By Clicking An "x" On An Image Preview?

I currently have a file input that shows an image preview once the user uploads their images. On the image preview, there is an 'x' that removes the image preview from the list. Is

Solution 1:

You can't remove files one by one, as the API for FileList has no removing method (probably for security reasons). You can however clear the entire file list, as suggested here: Clearing <input type='file' /> using jQuery


Post a Comment for "How Do I Delete An Image From A File Input By Clicking An "x" On An Image Preview?"