I'm using Paperclip to manage user-uploaded images on a site that is served entirely under HTTPS. In order to avoid the silly security warnings on IE7/IE8, I need to also serve these images over SSL. I typically render my images using something like the following:
<%= image_tag @product.image.url(:large) %>
where
class Product < ActiveRecord::Base
has_attached_file :image,
:styles => {
:large => {:geometry => "616x450#"}
},
:storage => :s3,
:s3_credentials => {:access_key_id => "xxx", :secret_access_key => "xxx"},
:path => ":attachment/:id/:style/:basename.:extension",
:bucket => CONFIG['s3_media_bucket'],
:default_url => "/assets/image_missing.png"
and the image URL produced is something like:
http://s3.amazonaws.com/media.example.com/images/6/large/image123.JPG
Is there a magic Paperclip option to change this to:
https://s3.amazonaws.com/media.example.com/images/6/large/image123.JPG
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…