Setting up bucket's name placed domain-style (bucket.s3.amazonaws.com) with Rails and Paperclip

后端 未结 3 1376
深忆病人
深忆病人 2021-01-08 00:24

Paperclip doc about url options:

You can choose to have the bucket\'s name placed domain-style (bucket.s3.amazonaws.com) or path-style (s3.amazonaws.c

3条回答
  •  囚心锁ツ
    2021-01-08 01:11

    Just set it like this:

    Paperclip::Attachment.default_options[:url] = ':s3_domain_url'
    

    Or like this:

    Paperclip::Attachment.default_options.merge!(
      :url => ':s3_domain_url'
    )
    

提交回复
热议问题