IE 11 lock the file when using HTML input=file tag

廉价感情. 提交于 2019-12-21 19:15:54

问题


  1. I choose the file using browse in the file input in IE11

  2. I deleted the file using shift+delete in the Explorer

  3. Then when I refresh the folder, the file that I deleted reappear again in Explorer.

Is there anyway that I can release the file handle by at the client side javascript? I tried that test in IE 8 but that issue didn't occurred.

Any kind help is appreciated.


回答1:


I could release the file handler as following in IE 11.

    document.getElementById("fileToUpload").value=""; // input file field
    document.getElementById("uploadForm").reset(); // form that containing input file field


来源:https://stackoverflow.com/questions/35055123/ie-11-lock-the-file-when-using-html-input-file-tag

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!