diff --git a/lib/paperclip/storage/s3.rb b/lib/paperclip/storage/s3.rb index 8ae09c3a8..2bfa8f86e 100644 --- a/lib/paperclip/storage/s3.rb +++ b/lib/paperclip/storage/s3.rb @@ -186,9 +186,9 @@ def self.extended base end unless Paperclip::Interpolations.respond_to? :asset_host end - def expiring_url(time = 3600, style_name = default_style) + def expiring_url(time = 3600, style_name = default_style, extra_options = {}) if path(style_name) - base_options = { expires_in: time } + base_options = { expires_in: time }.merge(extra_options) s3_object(style_name).presigned_url( :get, base_options.merge(s3_url_options),