-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Added :use_accelerate_endpoint
option when using S3
#2291
Conversation
path: ":attachment/:basename:dotextension", | ||
s3_host_name: "s3-accelerate.amazonaws.com", | ||
s3_region: "ap-northeast-1", | ||
use_accelerate_endpoint: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Align the elements of a hash literal if they span more than one line.
assert_match %r{^//s3-ap-northeast-1.amazonaws.com/bucket/avatars/data[^\.]}, @dummy.avatar.url | ||
end | ||
|
||
it "uses the S3 client with the use_accelerate_endpoint config is false" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [81/80]
Because the |
Can we add a condition such that that behavior is triggered both if the |
@@ -152,6 +154,8 @@ def self.extended base | |||
@options[:url] = @options[:url].inspect if @options[:url].is_a?(Symbol) | |||
|
|||
@http_proxy = @options[:http_proxy] || nil | |||
|
|||
@use_accelerate_endpoint = @options[:use_accelerate_endpoint] || false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|| false
is the same as nothing (falsy). We can drop that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I updated :)
path: ":attachment/:basename:dotextension", | ||
s3_host_name: "s3-accelerate.amazonaws.com", | ||
s3_region: "ap-northeast-1", | ||
use_accelerate_endpoint: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put a comma after the last parameter of a multiline method call.
end | ||
|
||
it "returns a url based on an :s3_host_name path" do | ||
assert_match %r{^//s3-ap-northeast-1.amazonaws.com/bucket/avatars/data[^\.]}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [85/80]
Merged it in. Thank you! 🎉 |
Thanks for your updating. It's great :) |
Amazon S3 Transfer Acceleration enables fast, easy, and secure transfers of files over long distances between your client and an S3 bucket. And aws-sdk has allowed us to enable this feature in version 2.3.0 (more detail is here).
You can now pass a configuration option (:use_accelerate_endpoint) when config Paperclip with S3. You can enable the Amazon S3 Transfer Acceleration by set this option:
:use_accelerate_endpoint => true