1

I just stumbled over a problem using the Dropbox API. Currently I am using the this lib: http://code.google.com/p/dropbox-php/

The problem is, if I upload a file I get a success but nothing arrives at the Dropbox. I also "hacked" into the library and changed some of the post stuff. I can post it if you want.

Anybody got a solution for that? Thanks!

//EDIT: I am using PHPs integrated OAuth functions //EDIT2:

<?php

include "class/Dropbox/autoload.php";
$oauth = new Dropbox_OAuth_PHP("xxxxxxxxxxx", "xxxxxxxxxxx");
$dropbox = new Dropbox_API($oauth);

//re-login
if(isset($_SESSION["oauth_tokens"])) {
    $my->oauth->setToken($_SESSION["oauth_tokens"]);
}

//uploads itself to DB
if($dropbox->putFile( basename(__FILE__),  __FILE__ )) {
    echo "Success";     
} else {
    echo "Fail :(";
}

sure this is not the complete code but assume that the user is logged in. :)

1
  • It would help if you posted the code you're trying to run. Commented Apr 22, 2011 at 6:25

1 Answer 1

1

Dropbox for PHP, the library you're using to upload files to Dropbox, isn't maintained anymore and therefore may not function properly.

Try out PHP Dropbox Uploader. It is mentioned on the official Dropbox wiki.

Sign up to request clarification or add additional context in comments.

1 Comment

I wanted to use the OAuth ability of Dropbox.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.