Reputation: 6762
I am trying to allow users to upload large files without tying up my servers for an extended amount of time. I thought using dropbox as file storage might be a good solution. My plan is to use javascript to have the client-side connect directly to dropbox, so that my server is not affected.
I have been trying to find a current javascript dropbox api, but have not had much success. I tried using dropbox-js, but it seems that it is using an outdated version of the API as I get the following error with my current test: {"error": "You're using an older version of the Dropbox API with a new API key. Please use the latest version."}
Does anyone know a fairly simple way to accomplish this task?
Upvotes: 1
Views: 3394
Reputation: 7134
Set up your application as a Folder app. If things go wrong, at least you won't blow up people's Dropboxes.
Follow these directions for obfuscating your API key and secret.
Use writeFile
to upload the files, and then use makeUrl
with the downloadHack: true
option, then send the URL to your server.
You'll need the git version of dropbox-js to use downloadHack
until the 0.7.0 release comes out.
Upvotes: 2