Detect file download with internet explorer

五迷三道 提交于 2020-04-16 05:45:40

问题


I am looking for a way to detect when user download a file event in internet explorer, but I didn't found a way yet, is it possible at all? how?


回答1:


You can try to detect file download in browser using jQuery File Download plugin. For more information, you could refer to this thread.

Note - You must also write a cookie in conjunction with using this plugin in the server's response headers

But I think you can't achieve your goal with only client-side code due to security issues. From the browser side, we can't reach the file save dialog from browser as it's OS level. From the file side, you don't have access to the files in the server and you don't know the states of the files. You could also refer to the accepted answer in this thread for more information.



来源:https://stackoverflow.com/questions/60372634/detect-file-download-with-internet-explorer

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