4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AWS S3でURLを発行する時有効期限を設定する方法

Last updated at Posted at 2013-06-07

タイトル通りですが、

S3Object.url_for([ファイルのパス], BUCKET, :expires_in => [秒数])

で設定完了

他にも

doomsday = Time.mktime(2030, 9, 13).to_i
S3Object.url_for([ファイルのパス], BUCKET, :expires => doomsday)

でもOK

基本的に制限を設けない場合

S3Object.url_for([ファイルのパス], BUCKET, :authenticated => false)

でセキュリティは落ちるが無限時間

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?