Todo
Todo

Reputation: 657

How to upload files from web client (HTML/jQuery form) to your Dropbox folder

I have a web page with a form. I want the user to upload file to a Dropbox folder and get the download link. Also I don't want the form to ask the user for authentication in order to upload the file.

How can I do this?

I registered an App for this purpose and read the Api documentation, but it seems to me to complicated and can't even start.

Upvotes: 2

Views: 3752

Answers (2)

user94559
user94559

Reputation: 60143

"Also I don't want the form to ask the user for authentication in order to upload the file."

You certainly can't upload files into a user's Dropbox without that user's permission.

The Saver is the closest to what you want in terms of allowing a user to save a file to Dropbox without having to authorize your app, but you won't get back a link to the file.

The Chooser also does something like this, which is to give the user the option of uploading a file to Dropbox before then choosing it. You could instruct the user to upload a file to Dropbox in the Chooser and then select it. After that, your app can get back a link to the uploaded file. You can try this out yourself in the Chooser demo and see if it meets your needs.

Upvotes: 1

Jack Cole
Jack Cole

Reputation: 1804

Dropbox website has a pretty good rundown of what you're trying to do in php: https://www.dropbox.com/developers/core/start/php

You can use an html form on your website that POSTs to a php page.

There should be plenty of available guides on the internet for setting up a form that saves the file on to your server using php/forms. You then just need to redirect the file to your Dropbox, using their API.

Upvotes: 2

Related Questions