RISCfuture / dropbox

An easy-to-use client library for the official Dropbox API.
MIT License
518 stars 46 forks source link

upload method errors out #23

Closed ciapecki closed 13 years ago

ciapecki commented 13 years ago

when using the example from README I get: `upload': wrong number of arguments (1 for 2) (ArgumentError) when executing: session.upload('testfile.txt')

when I change this line to: session.upload('testfile.txt','/')

I get: /home/chris/.rvm/gems/ree-1.8.7-2010.02/gems/dropbox-1.2.2/lib/dropbox/api.rb:208:in `upload': HTTP status Net::HTTPForbidden received: http://api-content.dropbox.com/0/files/sandbox (Dropbox::UnsuccessfulResponseError)

just to add that at this point authorization was successful.

thanks, chris

RISCfuture commented 13 years ago

Are you sure you have a sandbox-enabled API account? (See the Dropbox::API module docs.)

ciapecki commented 13 years ago

this what I see when looking at this app: App status Development (Apply for production status) Access type Full Dropbox

anything else I should check?

thanks, chris

RISCfuture commented 13 years ago

Ah, yeah, if you have a root-access app you need to configure the Dropbox API to know that. Again, see the Dropbox::API class docs for more.

ciapecki commented 13 years ago

thanks for your help, when setting :dropbox mode everything works as expected