2

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.

Todo
  • 657
  • 1
  • 10
  • 24
  • Well.. you need PHP for it I think. And read how it all works. Or search for a tutorial / example – putvande Aug 14 '13 at 12:51
  • 3
    No, I don't have to use php. – Todo Aug 14 '13 at 12:57
  • That's the thing, if you don't want to ask the user for authentication, you may have to use some way to not put your credentials on the client. So you'll need probably php, noode.js, java, etc. – maty_nz Aug 14 '13 at 13:02

2 Answers2

2

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.

Jack Cole
  • 1,528
  • 2
  • 19
  • 41
1

"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.

user94559
  • 59,196
  • 6
  • 103
  • 103
  • Hi, smarx! Thanks for your suggestions. I want the user to upload files to my Dropbox and I would give all the necessary permissions for this. I even have an C# console application that uses Dropbox app key and app secret of my own Dropbox app. But I need to accomplish it using jQuery/Javascript or if it's impossible without a server language ASP.NET is fine. – Todo Aug 14 '13 at 17:49
  • Ah, well you would need to use your auth token somewhere, and if you put it in the web page itself, any user of your app could steal your credentials. So I would recommend keeping it on the server and using something like ASP.NET. – user94559 Aug 14 '13 at 17:51