Comments (26)
Alternatively this commit is a lot more lightweight and has tests:
http://github.com/fesplugas/aws-s3/commit/90c30e79dc2327776308ba07c207a2a872325a3c
from aws-s3.
Wondering if this issue is ever going to get resolved, it's a pity as aws-s3 is such a great library and it's being used by Paperclip too, but no european bucket support is a pain for many many users
from aws-s3.
I've now converted to "carrierwave" and right_aws instead of paperclip. Aws-s3 is designed for the old non-euro Amazon API so all modifications to add Euro support look like nasty hacks and are difficult to test. RightAWS however uses the new API, if you avoid the helper Bucket/Key models and use the S3Interface directly it avoids many remote calls and performs very well. cheers, sam.
from aws-s3.
Well, this lib - isaacfeliu/aws-s3 is working good for our project.
from aws-s3.
I don't think this is just a question of "using the bucket as part of the domain name" and resolving that issue with a patch. The S3 API has changed (a long time ago) and aws-s3 hasn't kept up. Also, Amazon have just lowered their pricing on EU buckets, meaning this will be even more popular, and it wouldn't surprise me if they start launching data centers in Asia soon.
Use an alternative that works, as I'm certainly not going to oblige Marcel to fix this. Sam
from aws-s3.
@samlown : using an alternative is fine you're right, but it's a bit messy to manage vanilla gems and forked ones. At least could you write something about EU buckets in the README to avoid people to loose time like I did ?
from aws-s3.
The patch mentioned here looks pretty clean to me, and it seems to work great. Thanks to all responsible! Would sure be nice to get this merged into the proper repo, though..
from aws-s3.
Any progress?
from aws-s3.
Thanks, that looks great!
from aws-s3.
Change config/environment.rb
Add this at the bottom
AWS::S3::DEFAULT_HOST = "s3-eu-west-1.amazonaws.com"
You will see a warning about reinitializing the constant, but it works fine.
from aws-s3.
Of course, AWS::S3.set_default_host, would be better ;)
from aws-s3.
Using replace you can avoid those ugly warnings...
AWS::S3::DEFAULT_HOST.replace "s3-eu-west-1.amazonaws.com"
from aws-s3.
Note that this isn't just an issue with European buckets. The same issue exists with US-West and, presumably, Singapore buckets.
from aws-s3.
Also this works
class << AWS::S3
ENDPOINTS = {
:us => 's3-us-west-1.amazonaws.com',
:asia => 's3-ap-southeast-1.amazonaws.com',
:europe => 's3-eu-west-1.amazonaws.com'
}
def Base.region= region
endpoint = ENDPOINTS[region] or
raise S3Exception, "Unknown region: please use one of #{ENDPOINTS.keys.map(&:inspect).join(', ')}."
DEFAULT_HOST.replace endpoint
end
end
AWS::S3::Base.region = :europe
it should be included by our beloved author, marcel...
from aws-s3.
I can't believe this is still an open issue when there are so many solutions offered and aws-s3 is the standard way to use s3 buckets. This is a common issue I hear/see raised regarding s3. :(
from aws-s3.
Maybe Marcel thinks we can just use these solutions while he does his day job? Not ideal, but I'm very grateful he did the majority of the work for me. :)
from aws-s3.
elia : it did work for upload, while paperclip still showing s3.amazonaws.com URL, how do you solved it?
from aws-s3.
@gozali: I ended up using the s3 gem
from aws-s3.
I got paperclip working with s3 and eu-buckets after reading this tutorial: http://www.conandalton.net/2011/02/paperclip-s3-and-european-buckets.html
from aws-s3.
I switched to fog. :)
from aws-s3.
+1 for the solution on conandalton.net. Worked like a charm with one little fix, see comments.
from aws-s3.
@ella solution is work for me.
Why this is problem is steel not solved?
from aws-s3.
@leonko I think you should ask the author
from aws-s3.
@marcel can you add this changes in trunk, please?
from aws-s3.
@leonko It's quite unfriendly and inappropriate to "yell" at people like that. @marcel is in no way obligated to fix this for you. I realize it is not an ideal situation that this issue has not yet been resolved, but you can always fork the project, do whatever modifications you need and use your forked version.
from aws-s3.
wow just had a hard time debugging a very simple sinatra file upload using amazon s3 because of this issue! created a US standard bucket, and it now works like a charm!
from aws-s3.
Related Issues (20)
- content_type returns with a comma
- all meta data has "x-amz-meta" prefix to the name
- Error witth ActionView::Base.default_form_builder HOT 2
- Make the library threadsafe HOT 2
- How I can stub s3 in Rspec? HOT 1
- Header/Option for facilitating server-side encryption HOT 1
- Link to official Amazon SDK
- Consider adding additional contributors or transferring ownership HOT 8
- NameError: uninitialized constant AWS::S3::Base HOT 1
- aws-s3 license? HOT 3
- `.error.raise` on 403 Forbidden responses causes method_missing blowup HOT 1
- Unable to attach IAM role in S3 bucket policy HOT 1
- Ruby 2.5.1 not supported ? HOT 1
- Upload a directory method
- Cannot use environment variables with aws-s3?
- Problem getting data from S3 (No method value)
- Errno::EPIPE: Broken pipe HOT 2
- Warning Digest::Digest is deprecated; use Digest HOT 7
- Rails + aws-s3 : AWS::S3::Base.establish_connection! just once or before every s3 operation ?
- @@{:instance writer=>true} issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-s3.