johnnyhalife / waz-storage

A simple implementation of Windows Azure Storage API for Ruby, inspired by the S3 gems and self experience of dealing with queues. The major goal of the whole gem is to enable ruby developers [like me =)] to leverage Windows Azure Storage features and have another option for cloud storage.
http://waz-storage.heroku.com
MIT License
40 stars 21 forks source link

undefined method `length' #9

Closed buddylindsey closed 13 years ago

buddylindsey commented 13 years ago

Another issue. I was trying to upload a gif using irb with this line.

blob = con.store('pew_pew.gif',File.open('pew.gif'),'image/gif')

I got the following error

NoMethodError: undefined method `length' for #File:pew.gif

I tracked it down and changed the method length to 'size' in this file:

lib/waz/storage/core_service.rb Line 26

And it worked.

Not sure if I am doing something wrong, but this is what had to do to get it to work.

Thanks for the great work.

johnnyhalife commented 13 years ago

I'm including your fix on 1.0.5 to be released today