I\'ve been using this forever with paperclip and aws-s3:
def authenticated_url(style = nil, expires_in = 90.minutes)
AWS::S3::S3Object.url_for(attach
I recently made the switch from aws-s3 to aws-sdk as well. I replaced all my url_for with the following:
def authenticated_url(style = nil, expires_in = 90.minutes)
self.attachment.expiring_url(expires_in, (style || attachment.default_style))
end
You can see the discussion in the paperclip issues thread here: https://github.com/thoughtbot/paperclip/issues/732