Skip to content
Browse files

convert expires_at option on authenticated_s3_url to integer to preve…

…nt amazon errors
  • Loading branch information...
1 parent 5b16d05 commit 02df072d760610ff368658e85062afcc163f352b Greg Borenstein committed Jan 30, 2009
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/technoweenie/attachment_fu/backends/s3_backend.rb
View
1 lib/technoweenie/attachment_fu/backends/s3_backend.rb
@@ -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

0 comments on commit 02df072

Please sign in to comment.
Something went wrong with that request. Please try again.