marcel / aws-s3
- Source
- Commits
- Network (51)
- Issues (7)
- Downloads (6)
- Wiki (1)
- Graphs
-
Branch:
master
-
Code snippet (a Rake task):
task :boog => :environment do require 'aws/s3' include AWS::S3 Base.establish_connection!( :access_key_id => S3[:access_key_id], :secret_access_key => S3[:secret_access_key] ) begin puts "Checking delete..." S3Object.delete("TEST", S3[:bucket]) puts "...Success" rescue S3Exception => e p e.message puts "Fail: Could not delete" end endstack trace:
trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/extensions.rb:137:in `__method__' trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/extensions.rb:137:in `expirable_memoize' trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/extensions.rb:176:in `canonical_string' trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/authentication.rb:72:in `encoded_canonical' trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/authentication.rb:94:in `initialize' trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/connection.rb:130:in `new' trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/connection.rb:130:in `authenticate!' trunk/vendor/gems/aws-s3-0.6.1/lib/aws/s3/connection.rb:34:in `request'Comments
-
Buckets that have numeric keys are unable to list the contents of the bucket. For example, a key equal to '20092521' will not work correctly, but '20092521.txt' will.
Comments
-
AWS::S3::Connection.create_connection has the following bit of logic...
http.use_ssl = !options[:use_ssl].nil? || options[:port] == 443
:use_ssl => false thus turns SSL on - which is incorrect/unexpected behaviour
Comments
-
Currently there's problem with writing to buckets that are located in Europe. That's because we need the bucket name as part of the domain name, rather than the path itself.
We have a fork of this library that supports writing to buckets. Is it possible to have a merge of those changes?
Comments
Alternatively this commit is a lot more lightweight and has tests:
http://github.com/fesplugas/aws-s3/commit/90c30e79dc2327776308ba07c207a2a872325a3c
This is the work made by Isaac Feliu and Lars Pind. Isaac's repo is not a clone of Marcel's, so I cloned Marcel repo, and merged all the patches on a single commit. Tests are not passing on my repo, so don't expect Marcel to merge it.
donaldpiret
Wed Dec 09 01:07:15 -0800 2009
| link
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
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.
Interesting to have another alternative to "paperclip" but I'm sure a lot of people is using Marcel's gem, so why not having support for the European buckets.
Marcel, any plans to merge changes into the master branch?
Well, this lib - isaacfeliu/aws-s3 is working good for our project.
Isaac did a good job adding to aws-s3 support for the EU buckets, the problem was that his repository was not a git fork a Marcel's. In my repository fesplugas/aws-s3 I forked Marcel repository and applied all changes made by Isaac Feliu. So that copy should be the one Marcel should look at.
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
-
AWS::S3::S3Object.copy method doesn't work with additional options
1 comment Created 4 months ago by ksekharAWS::S3::S3Object.copy method doesn't merge options hash passed to it properly with the store method used by it.
steps to reproduce:
1. AWS::S3::S3Object.copy(source_path, copy_path, bucket, :access => :public_read)
2. creates copy of file at copy_path
3. trying to access the copy_path file will return "access denied" xml in Firefoxworkaround:
use AWS::S3::S3Object.store(copy_path, open(AWS::S3::S3Object.url_for(source_path,bucket), bucket, :access => :public_read)Comments
nathancolgate
Mon Dec 07 17:27:41 -0800 2009
| link
Looking at the source, seems the best thing to do is:
AWS::S3::S3Object.copy(source_path, copy_path, bucket, :copy_acl => true)
-
AWS::S3::Connection.prepare_path doesn't properly escape plus sign '+' in key
0 comments Created 3 months ago by tekwizAWS::S3::Connection.prepare_path isn't properly escaping the plus sign in a key. This is because the plus sign is sometimes used to represent a space (at least according to the Ruby devs) i.e. the URI.escape() doesn't convert '+' to '%2B'...
Solution: Add a special gsub on line 11 i.e.
URI.escape(path)toURI.escape(path).gsub('+', '%2B')Comments
-
... right_http_connection-1.2.4/lib/net_fix.rb
... aws-s3-0.6.2/lib/aws/s3/extensions.rb
Original version of send_request_with_body_stream takes 5 arguments, but rewritten one takes only 4.
Comments
-
I have an empty folder (bar) in my s3 bucket
bucket = Bucket.find("my.bucket", :prefix => "bar") bucket.object.size # => 1000I'm fairly certain this should return 0, since there aren't any files that match :prefix, yet I'm getting back a bunch of files from other folders on s3.
Is this expected behavior?
Comments
I have the same issue! Did you work-around it or find anything useful?
Actually - my issue is a little different. I have a bucket with 12 objects and if I try to "find" files with a prefix that doesn't exist it returns all objects.
>> list = Storage.list('/non-existant-key/prefix','flix.spokt.us') => #<AWS::S3::Bucket:0x31ab820 @attributes={"prefix"=>"/non-existant-key/prefix", "name"=>"flix.spokt.us", "marker"=>nil, "max_keys"=>1000, "is_truncated"=>false}, @object_cache=[]> >> list.size => 38





Could you show me the result of running 'ruby -v' please? Thanks.
Try downloading version 0.6.2. Your problem should be fixed now. Let me know if it isn't. Thanks.
ruby 1.8.7 (2008-06-20 patchlevel 22) [i686-darwin9]
0.6.2 fixed it. thanks.