Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Docs: Provide example for s3_host_name #2379

Merged
merged 2 commits into from Jan 30, 2018

Conversation

dijonkitchen
Copy link
Contributor

Gives an example, since not everyone knows the format required.

Gives an example, since not everyone knows the format required.
@@ -94,7 +94,7 @@ module Storage
# to interpolate. Keys should be unique, like filenames, and despite the fact that
# S3 (strictly speaking) does not support directories, you can still use a / to
# separate parts of your file name.
# * +s3_host_name+: If you are using your bucket in Tokyo region etc, write host_name.
# * +s3_host_name+: If you are using your bucket in Tokyo region etc, write host_name (e.g., 's3-ap-northeast-1.amazonaws.com').

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line is too long. [132/80]

@dijonkitchen
Copy link
Contributor Author

This is still relevant!

@sidraval sidraval merged commit 92b3307 into thoughtbot:master Jan 30, 2018
@dijonkitchen dijonkitchen deleted the patch-1 branch January 30, 2018 06:46
@obelich
Copy link

obelich commented Feb 15, 2018

i have problem using this :( it dont working give a Aws::S3::Errors::Http405Error ():
i have in Gemfile
gem 'aws-sdk', '~> 2'
gem 'paperclip', :git => "git://github.com/thoughtbot/paperclip.git"

`
Paperclip::Attachment.default_options[:storage] = :s3
Paperclip::Attachment.default_options[:s3_region] = "us-west-1"
Paperclip::Attachment.default_options[:s3_protocol] = "http"
Paperclip::Attachment.default_options[:url] = ":s3_domain_url"
Paperclip::Attachment.default_options[:path] = ":class/:attachment/:id_partition/:style/:filename"

Paperclip::Attachment.default_options[:s3_credentials] = {
bucket: ENV['S3_BUCKET'],
access_key_id: ENV['S3_ACCESS_KEY'],
secret_access_key: ENV['S3_SECRET_KEY'],
s3_host_name: ENV['S3_HOST_NAME']
}

Paperclip::Attachment.default_options[:s3_options] = {
force_path_style: true,
endpoint: 'http://files.jelp.io.s3-website-us-west-1.amazonaws.com'
}

`

@dijonkitchen
Copy link
Contributor Author

@obelich I'm not sure this is the right place to put your problem unless it has to do with the s3_host_name.

I'd check the installation instructions in the Readme (for example, do you realy need the latest paperclip version on git?), https://github.com/thoughtbot/paperclip#defaults, and http://www.rubydoc.info/gems/paperclip/Paperclip/Attachment.default_options

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants