I have a form that allows a user to fill in several aspects and then choose a file to upload.
When the form is submitted, I want write some code that saves the file to a dropbox account and gets access to a direct download link and places this in a database I am hosting.
If anyone has done this, is there a specific section of the API to look at? Or any examples?
I can't seem to find this in the API.
Thanks.
From what I see in the API it is possible to do this. You need to download the Dropbox Core API. Inside the zip file, you will find an example folder with example code for authentication, upload, download, direct-link and so on. Just see the
direct-link.php
and change it to your needs. Here is a tested working example of uploading a file and generating a direct link for download:I made this really fast just to get it working. Eventually you may need to tweak it a bit so it will suite your needs.
There is section in the Core API manual, see this link. So you can use the upload part like this: