Skip to content

Commit

Permalink
convert expires_at option on authenticated_s3_url to integer to preve…
Browse files Browse the repository at this point in the history
…nt amazon errors
  • Loading branch information
Greg Borenstein committed Jan 31, 2009
1 parent 5b16d05 commit 02df072
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/technoweenie/attachment_fu/backends/s3_backend.rb
Expand Up @@ -276,6 +276,7 @@ def s3_url(thumbnail = nil)
# @photo.authenticated_s3_url('thumbnail', :expires_in => 5.hours, :use_ssl => true)
def authenticated_s3_url(*args)
options = args.extract_options!
options[:expires_in] = options[:expires_in].to_i if options[:expires_in]
thumbnail = args.shift
S3Object.url_for(full_filename(thumbnail), bucket_name, options)
end
Expand Down

0 comments on commit 02df072

Please sign in to comment.