Understanding Object URLS for client-side files and how to free the memory

佐手、 提交于 2019-12-03 15:11:50

The other reference (the one beginning with blob:blobinternal) seems to be held by the input type="file" element. I modified your function to reset the value of the input, and when I click the revoke URL button, all the references are cleared:

killBut.onclick = function () {
    URL.revokeObjectURL(ourURL);
    fileBut.value = '';
};

Tested in Chrome Canary.

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