Commit ca481b4a by Jon Yurek

Formatting in storage.rb

parent 9e71b211
...@@ -118,11 +118,11 @@ module Paperclip ...@@ -118,11 +118,11 @@ module Paperclip
require 'right_aws' require 'right_aws'
base.instance_eval do base.instance_eval do
@s3_credentials = parse_credentials(@options[:s3_credentials]) @s3_credentials = parse_credentials(@options[:s3_credentials])
@bucket = @options[:bucket] || @s3_credentials[:bucket] @bucket = @options[:bucket] || @s3_credentials[:bucket]
@s3_options = @options[:s3_options] || {} @s3_options = @options[:s3_options] || {}
@s3_permissions = @options[:s3_permissions] || 'public-read' @s3_permissions = @options[:s3_permissions] || 'public-read'
@s3_protocol = @options[:s3_protocol] || (@s3_permissions == 'public-read' ? 'http' : 'https') @s3_protocol = @options[:s3_protocol] || (@s3_permissions == 'public-read' ? 'http' : 'https')
@s3_headers = @options[:s3_headers] || {} @s3_headers = @options[:s3_headers] || {}
@url = ":s3_path_url" unless @url.to_s.match(/^:s3.*url$/) @url = ":s3_path_url" unless @url.to_s.match(/^:s3.*url$/)
end end
base.class.interpolations[:s3_path_url] = lambda do |attachment, style| base.class.interpolations[:s3_path_url] = lambda do |attachment, style|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment