Will
Will

Reputation: 5580

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(?) but I can't find anything actually providing instructions on how to do so.

Upvotes: 3

Views: 6659

Answers (3)

Teja Vemparala
Teja Vemparala

Reputation: 21

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

Upvotes: 1

Alberto Cerqueira
Alberto Cerqueira

Reputation: 1409

Check Content-Disponsition in your File S3 or when upload the file.

enter image description here

Upvotes: 3

Mike Miller
Mike Miller

Reputation: 16575

You can select file > properties > meta-data and add the content-disposition header as an option there.

enter image description here

Upvotes: 11

Related Questions