lib/paperclip-aws.rb in paperclip-aws-1.4.0 vs lib/paperclip-aws.rb in paperclip-aws-1.4.1

- old
+ new

@@ -40,23 +40,15 @@ :sse => false, :storage_class => :standard, :content_disposition => nil }) - # @s3_sse = @s3_options[:sse] || false - # # choose what storage class we use, 'standard' or 'reduced_redundancy' - # @s3_storage_class = @s3_options[:storage_class] || :standard - # - # @s3_content_disposition = @s3_options[:content_disposition] || '' - @s3_endpoint = @s3_credentials[:endpoint] || 's3.amazonaws.com' @s3_host_alias = @options.s3_host_alias @s3_host_alias = @s3_host_alias.call(self) if @s3_host_alias.is_a?(Proc) - - - + @s3 = AWS::S3.new( :access_key_id => @s3_credentials[:access_key_id], :secret_access_key => @s3_credentials[:secret_access_key], :s3_endpoint => @s3_endpoint ) @@ -64,11 +56,12 @@ end def url(style=default_style, options={}) if self.original_filename.nil? - default_url = @default_url.is_a?(Proc) ? @default_url.call(self) : @default_url - return interpolate(default_url, style) + # default_url = @default_url.is_a?(Proc) ? @default_url.call(self) : @default_url + # return interpolate(default_url, style) + return super end if options[:expires].present? || options[:action].present? options.reverse_merge!({ :expires => 60*60,