Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

pep11's avatar
pep11
Explorer | Level 3
8 years ago

Create a form to upload file to Dropbox file request folder

I am completely new to API development having only limited coding experience. My goal is to create a form that allows the user to upload a file to a Dropbox file request folder. If Dropbox file request allowed you to enter text along with uploading a file, then I wouldn't have this need.

 

How do I tell the form where to upload the file? Also wondering the best way to store the data captured in the form.

 

6 Replies

Replies have been turned off for this discussion
  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    8 years ago
    The Dropbox API doesn't offer a way to programmatically upload to file requests, but I'll pass this along as a feature request.

    You can use the Dropbox API to upload directly to a folder though, as long as your app is authorized to access the account. To upload programmatically, you can use /2/files/upload:

    https://www.dropbox.com/developers/documentation/http/documentation#files-upload

    That accepts the full path for where you want to put the uploaded file.

    That's a link the documentation for the HTTPS endpoints themselves, but we recommend using one of the official SDKs if possible:

    https://www.dropbox.com/developers/documentation

    Those have corresponding native methods for the HTTPS endpoints.

    I can't offer general data storage advice outside of using the Dropbox API though, and the "best way" would depend on the needs of your app anyway.
  • pep11's avatar
    pep11
    Explorer | Level 3
    8 years ago

    Thanks Greg.

     

    The goal is to have users upload jpgs via a form where those jpg files would be stored in my Dropbox along with a text file to correspond with the jpg.

     

    My coding knowledge is at a beginner stage. Having never used the API, I think this is a bit advanced for my current state of knowledge. Even reading the documentation assumes a level of understanding to know what you're reading.

  • buttflattery's avatar
    buttflattery
    Explorer | Level 4
    7 years ago

    one thing that i am confused about is that we need to upload file to our server first and then upload to dropbox folder, in case we are using a form and user provides a file via file input using file browse dialog. Then first we will upload the file to our server and then upload to dropbox if i am not wrong about it. there isnt any other way to bypass uploading to our server frist.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    7 years ago

    buttflattery While Dropbox API still doesn't offer a way to programmatically upload to file requests, if you can run JavaScript in the browser, you could avoid uploading the file to your own server first, by uploading the file to Dropbox directly from the browser.

    For instance, you can make the /2/files/upload call directly from the browser, as long as you have the access token client-side.

    Or, even without having the access token client-side, you can have the server call /2/files/get_temporary_upload_link to get a temporary upload link, and then send that link to the client. The client can then upload directly to Dropbox via that link.

  • spadgett's avatar
    spadgett
    New member | Level 2
    6 years ago

    This is an old thread but this is exactly what I have need of now. I'm working to figure out a homework repository for students and a photo file upload location for parents at our small private school. We have families working from home and I'm looking for a quick solution to this need. I signed up for Dropbox Pro and hope that file request will be a simple solution. I think I understand that I could do one of two very easy ways to manage the files 1) I could just do a Dropbox Showcase site and allow for upload there (I think, I'm sampling this), or I could just do the Google Form and include the request file link within the form. I don't like this option so much as most people will be using their cell phones to activate the link for uploading the file. But it would at least help me to match the files together with the uploads and will tell me which file repository was used. I do prefer to create a form with an upload link directly on it. Is this possible with Zapier somehow? Anyone have any suggestions? Did you figure out a solution to this post?

  • pep11's avatar
    pep11
    Explorer | Level 3
    6 years ago

    Hi spadgett -

     

    I never figured out an easy solution with Dropbox. If my coding skills were better, I'm sure I could have written something to make it work. Seems so easy for Dropbox to create a form with File Requests.

     

    What I ended up using was Form+.  I only needed to collect the files for a limited time so only paid for one month of Form+. The first month was free. I created a form and had all the files upload to my Dropbox. Each form entry was added to a Google spreadsheet. I'd use the spreadsheet to match the files to the entry. Still wasn't all that efficient, but the project I was doing was temporary.

     

    What I was doing was collecting a photo from every family (small, private school). I needed the parent to upload the photo and tell me which classrooms they were a member of. So some families were in one classroom, while others were in 3 different classes. I would then use the spreadsheet with all the entries to see which classrooms they were part of and then copy the photo to the appropriate classroom folder. If Form+ had the ability to dynamically save the file to a folder based upon form input, this would have been much easier. It was still way better than using Dropbox File Request (different File Request for each class plus one folder for a family that was in multiple classes) and then emailing every parent when a file was uploaded to ask them for the names of the people in the photo (that was the info I needed to collect for every photo). Those families who had children in multiple classes required me to manually look them up to see which classes they were a member of. Form+ made the whole process 90% efficient.

     

    Dropbox Plus has become an essential tool for me. The File Requests has been a feature I use most often for school work (I'm a parent volunteer). The ability to also link to a file on Dropbox has been essential, as well as the ability to share a Dropbox folder.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

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!