You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
gdiazderada
7 years agoExplorer | Level 4
Chooser - Set dropbox file as input type file value
Hi there, I'm using the chooser to allow the user to select a file which then should be set as the value of an input type=file of a form. Right now I'm trying to do this within the chooser succes...
- 7 years ago
Thanks for following up with the additional information. It sounds like the Dropbox portion of this is working properly then, so I'm afraid I can't be of much help.
From your description, you're having trouble with the rest of the HTML/JavaScript work to be done with your app. That's outside the scope of Dropbox API support unfortunately.
For reference though, the Dropbox Chooser returns link(s) for the selected file(s) back to your app, not File objects or file data. (That way, all of the file data doesn't need to be sent through the user's browser.) What you do with those is up to you, but you generally would just send the link(s) up to your server, i.e., as text, not files.
Greg-DB
7 years agoDropbox Staff
Can you elaborate on what exactly isn't working for you? For example, is the success callback getting called? What error do you get?
It looks like you're to set the value of some element to files[0], but each element in that array is a JSON object as documented here:
https://www.dropbox.com/developers/chooser#response
It looks like you're to set the value of some element to files[0], but each element in that array is a JSON object as documented here:
https://www.dropbox.com/developers/chooser#response
- gdiazderada7 years agoExplorer | Level 4
The callback is being fired properly, the problem is it seems I cannot set the files property of an input of type file since it's readonly.
I got a form with an input file so the user can upload files from the computer. Also wanted to give the user the ability to upload files from the Dropbox picker, but I'm not sure how to handle that in terms of form submission and handling.
Thanks
- Greg-DB7 years agoDropbox Staff
Thanks for following up with the additional information. It sounds like the Dropbox portion of this is working properly then, so I'm afraid I can't be of much help.
From your description, you're having trouble with the rest of the HTML/JavaScript work to be done with your app. That's outside the scope of Dropbox API support unfortunately.
For reference though, the Dropbox Chooser returns link(s) for the selected file(s) back to your app, not File objects or file data. (That way, all of the file data doesn't need to be sent through the user's browser.) What you do with those is up to you, but you generally would just send the link(s) up to your server, i.e., as text, not files.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,910 PostsLatest Activity: 3 days agoIf 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 or Facebook.
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!