{"issue":{"milestone":null,"user":{"id":217279,"login":"tarnfeld","url":"https://api.github.com/users/tarnfeld","avatar_url":"https://secure.gravatar.com/avatar/61d87c147115e5d1979c032bc837fe08?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"61d87c147115e5d1979c032bc837fe08"},"title":"S3Object.store $stdin","created_at":"2011-12-18T11:08:20Z","updated_at":"2011-12-18T11:08:20Z","labels":[],"state":"open","id":2592947,"closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"html_url":"https://github.com/marcel/aws-s3/issues/49","body":"Hey,\r\n\r\nI've been trying to build a tool that allows me to put some data from STDIN into S3, and I have hit a brick wall with your S3 library. When I try to call `AWS::S3::S3Object.store(path, $stdin, bucket)` I get an exception thrown...\r\n\r\n    /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/connection.rb:41:in `request': undefined method `size' for #<IO:0x106464bd0> (NoMethodError)\r\n    \tfrom /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/http.rb:543:in `start'\r\n    \tfrom /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/connection.rb:52:in `request'\r\n    \tfrom /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:69:in `request'\r\n    \tfrom /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/base.rb:88:in `put'\r\n    \tfrom /Library/Ruby/Gems/1.8/gems/aws-s3-0.6.2/lib/aws/s3/object.rb:241:in `store'\r\n    \tfrom ./s3pipe.rb:115\r\n\r\nEverything works great if I call `$stdin.read` however the data i'm piping into my ruby program is upwards of 2GB, and i'm running this on low memory machines.\r\n\r\nBy the looks of things, your relying on a few methods that are only defined in the File class, and not handling raw IO objects. It would be *aweseomeee* if you could fix this bug :-)! I can't wait to open source this little ruby file i'm writing!\r\n\r\nThanks.","number":49,"url":"https://api.github.com/repos/marcel/aws-s3/issues/49","comments":0,"assignee":null},"action":"opened"}