简体   繁体   中英

Chrome can't download a link from a file on AWS S3

Currently I'm using .NET to generate a presigned URL for a file I upload on S3, after I get the URL I send and email to the client with an anchor tag in it pointing to the generate URL and letting them know that the file is ready to download. The problem is that whenever I click on the link, chrome tries to open a new tab for a few seconds and then closes that new tab without really triggering a download. It does work with other browsers or even if I copy the link and open a new tab myself and paste it there then the download starts...

Any ideas as to what could be happening here?

As a workaround, we created a route in our application where you can download the s3 file via our app not directly from the browser.

I believe the reason that Chrome does not allow this to happen is security thus if you move the downloading part to your server will solve the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM