how to make a link to a S3 file download rather then display
If I have a file stored on amazon S3 and I want it to download when the user clicks on it normally, how can I accomplish that?
I found some information on setting the content disposition(?) b开发者_StackOverflowut I can't find anything actually providing instructions on how to do so.
You can select file > properties > meta-data and add the content-disposition header as an option there.
Check Content-Disponsition in your File S3 or when upload the file.
You can configure it by using setContentDisposition in sdk
In java
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentDisposition("attachment; filename=...");
By this when a user clicks on the link file will be downloaded
精彩评论