How can I create a one time download link with Amazon S3?

后端 未结 2 1467
我寻月下人不归
我寻月下人不归 2020-12-14 08:40

I want to create a one time download link to an amazon s3 hosted file. This link expires once the file has been downloaded.

I want this file to still be hosted but a

2条回答
  •  感情败类
    2020-12-14 08:44

    There is no way to tell S3 to allow a link to be used only once. But you can create a link that can only be used until a specified time. What I do is redirect the requester to an S3 link that expires in a few minutes, so he or she doesn't have time to share it. You can make that expiration time very short, even a few seconds, so long as their browser has time to receive the redirect response and follow it.

提交回复
热议问题