RISCfuture/dropbox

'No such file or directory' on session.upload

fguillen opened this issue · 2 comments

Trying to upload a file to my dropbox account I receive a Errno::ENOENT: No such file or directory

ruby-1.9.2-p0 > require 'dropbox'
 => true 
ruby-1.9.2-p0 > s = Dropbox::Session.deserialize( File.read( "dropbox_session_authorized.serialized" ) )
 => #<Dropbox::Session xxxxxx (authorized)> 
ruby-1.9.2-p0 > s.mode = :dropbox
 => :dropbox 
ruby-1.9.2-p0 > s.upload( '/tmp/file1.txt', '/file.txt' )
Errno::ENOENT: No such file or directory - file1.txt
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/parts.rb:41:in `size'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/parts.rb:41:in `initialize'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/parts.rb:5:in `new'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/parts.rb:5:in `new'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/multipartable.rb:6:in `block in initialize'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/multipartable.rb:6:in `each'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/multipartable.rb:6:in `map'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/multipart-post-1.0.1/lib/multipartable.rb:6:in `initialize'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/dropbox-1.2.3/lib/dropbox/api.rb:200:in `new'
    from /Users/fguillen/.rvm/gems/ruby-1.9.2-p0@vitreous/gems/dropbox-1.2.3/lib/dropbox/api.rb:200:in `upload'
    from (irb):18
    from /Users/fguillen/.rvm/rubies/ruby-1.9.2-p0/bin/irb:17:in `<main>'
ruby-1.9.2-p0 > File.read( '/tmp/file1.txt' )
 => "file1" 

Thanks a lot for the support.

Fixed updating multipart-post to version 1.1.0

Thanks -- updated the Gemfile.