From 02df072d760610ff368658e85062afcc163f352b Mon Sep 17 00:00:00 2001 From: Greg Borenstein Date: Fri, 30 Jan 2009 20:48:49 -0800 Subject: [PATCH] convert expires_at option on authenticated_s3_url to integer to prevent amazon errors --- lib/technoweenie/attachment_fu/backends/s3_backend.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/technoweenie/attachment_fu/backends/s3_backend.rb b/lib/technoweenie/attachment_fu/backends/s3_backend.rb index e6b734d..87d3f03 100644 --- a/lib/technoweenie/attachment_fu/backends/s3_backend.rb +++ b/lib/technoweenie/attachment_fu/backends/s3_backend.rb @@ -276,6 +276,7 @@ module Technoweenie # :nodoc: # @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