ProgerXP / FileDrop

Self-contained cross-browser pure JavaScript class for Drag & Drop and AJAX (multi) file upload.
filedropjs.org
The Unlicense
264 stars 61 forks source link

Clear the drop area #72

Open rihani opened 5 years ago

rihani commented 5 years ago

How am i able to clear the drop area after a sucessful upload. I tried using Clear() but not working

zone.el.clear();

ProgerXP commented 5 years ago

Not all browsers support clearing the file input. Use zone.clear() (https://github.com/ProgerXP/FileDrop/blob/master/filedrop.js#L1145) or recreate the drop zone which works everywhere.

Also note that zone.el is an arbitrary element (like fieldset), not input or something with a value.