Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
gdiazderada
8 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...
- 8 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
Dropbox Community Moderator
8 years agoCan 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
gdiazderada
8 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-DB8 years ago
Dropbox Community Moderator
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.
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!
Related Content
- 4 years agoanonymous