Chrome blocks download at second attempt

↘锁芯ラ 提交于 2021-01-29 07:04:47

问题


I have an anchor on my page with href set to a PDF file URL and download set to a string. With first attempt the file is downloaded ok but second time and consecutive attempts it doesn't work with the error "This site attempted to download multiple files automatically". When I try with firefox the download works every single time. What's going on here?


回答1:


Setting -> advanced -> setting content -> Automatic downloads

You have two options. Use the slider next to Do not allow any site to download multiple files automatically to turn on this restriction. This setting causes Chrome to block all automatic subsequent file downloads following the first one, which you initiate. If you move the slider to the off position, you see Ask when a site tries to download files automatically after the first file, which is the recommended setting. This option will prompt you each time a website attempts to download multiple files automatically following the first one.



来源:https://stackoverflow.com/questions/52917030/chrome-blocks-download-at-second-attempt

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