Giter VIP home page Giter VIP logo

Comments (26)

samlown avatar samlown commented on August 18, 2024

Alternatively this commit is a lot more lightweight and has tests:

http://github.com/fesplugas/aws-s3/commit/90c30e79dc2327776308ba07c207a2a872325a3c

from aws-s3.

donaldpiret avatar donaldpiret commented on August 18, 2024

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.

samlown avatar samlown commented on August 18, 2024

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.

StanBright avatar StanBright commented on August 18, 2024

Well, this lib - isaacfeliu/aws-s3 is working good for our project.

from aws-s3.

samlown avatar samlown commented on August 18, 2024

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.

jhchabran avatar jhchabran commented on August 18, 2024

@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.

greatseth avatar greatseth commented on August 18, 2024

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.

tlray avatar tlray commented on August 18, 2024

Any progress?

from aws-s3.

tlray avatar tlray commented on August 18, 2024

Thanks, that looks great!

from aws-s3.

fjfish avatar fjfish commented on August 18, 2024

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.

fjfish avatar fjfish commented on August 18, 2024

Of course, AWS::S3.set_default_host, would be better ;)

from aws-s3.

elia avatar elia commented on August 18, 2024

Using replace you can avoid those ugly warnings...
AWS::S3::DEFAULT_HOST.replace "s3-eu-west-1.amazonaws.com"

from aws-s3.

xwmx avatar xwmx commented on August 18, 2024

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.

elia avatar elia commented on August 18, 2024

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.

parndt avatar parndt commented on August 18, 2024

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.

fjfish avatar fjfish commented on August 18, 2024

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.

goz avatar goz commented on August 18, 2024

elia : it did work for upload, while paperclip still showing s3.amazonaws.com URL, how do you solved it?

from aws-s3.

elia avatar elia commented on August 18, 2024

@gozali: I ended up using the s3 gem

from aws-s3.

murdoch avatar murdoch commented on August 18, 2024

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.

parndt avatar parndt commented on August 18, 2024

I switched to fog. :)

from aws-s3.

manuelmeurer avatar manuelmeurer commented on August 18, 2024

+1 for the solution on conandalton.net. Worked like a charm with one little fix, see comments.

from aws-s3.

batizhevsky avatar batizhevsky commented on August 18, 2024

@ella solution is work for me.
Why this is problem is steel not solved?

from aws-s3.

elia avatar elia commented on August 18, 2024

@leonko I think you should ask the author

from aws-s3.

batizhevsky avatar batizhevsky commented on August 18, 2024

@marcel can you add this changes in trunk, please?

from aws-s3.

manuelmeurer avatar manuelmeurer commented on August 18, 2024

@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.

cyrildiagne avatar cyrildiagne commented on August 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.