Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Sorry, I'm just a hack trying to upload a database backup to dropbox. API v1 worked fine but now I'm forced to migrate.
Here's the code I used to use, with the old API v1 commands and the new API v2 ones.
Not working - can someone please help?
use Dropbox\Dropbox; use Dropbox\DropboxApp; use Dropbox\DropboxFile; $app = new DropboxApp(1,2,3); $dropbox = new Dropbox($app); $backupFile = "/home/edplorga/backups/temp/db_" . date('d-m-Y').".zip"; $backupFilename = "/db_" . date('d-m-Y').".zip"; //Old stuff $appInfo = dbx\AppInfo::loadFromJsonFile(DIR."/config.json"); $dbxClient = new dbx\Client($accessToken, "EDPL_SQL_Backups"); $f = fopen($backupFile, "rb"); $result = $dbxClient->uploadFile($backupFilename, dbx\WriteMode::force(), $f); fclose($f); //New stuff $dropboxFile = DropboxFile::createByStream($backupFilename, $backupFile);
how to write code for File Upload using Nodejs
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!