lib/paperclip/storage/s3.rb in paperclip-2.3.10 vs lib/paperclip/storage/s3.rb in paperclip-2.3.11
- old
+ new
@@ -92,11 +92,11 @@
Paperclip.interpolates(:s3_domain_url) do |attachment, style|
"#{attachment.s3_protocol}://#{attachment.bucket_name}.s3.amazonaws.com/#{attachment.path(style).gsub(%r{^/}, "")}"
end unless Paperclip::Interpolations.respond_to? :s3_domain_url
end
- def expiring_url(time = 3600)
- AWS::S3::S3Object.url_for(path, bucket_name, :expires_in => time )
+ def expiring_url(time = 3600, style_name = default_style)
+ AWS::S3::S3Object.url_for(path(style_name), bucket_name, :expires_in => time, :use_ssl => (s3_protocol == 'https'))
end
def bucket_name
@bucket
end