We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
eliotcole
6 years agoExplorer | Level 4
Data URL via a JSON POST to a Temporary Upload Link - Composition Help
Hi I just need a little bump in the right direct to upload a file to an approved Temporary Upload Link. I've created the link, and I have the source file in application/octet-stream format, r...
Greg-DB
Dropbox Community Moderator
6 years agoWhen uploading to a "/apitul" link like this, the file data to upload needs to be sent in the HTTPS request body as "application/octet-stream". Exactly how you do that will depend on your scenario and the client you're using (curl, in this case).
For example, with curl, you can use curl's "--data-binary" parameter to supply the data to send, with the "@filename" syntax to specify a local file.
You mentioned that you just have a URL to the file though, as opposed to having it on the local filesystem, so you probably can't use that parameter exactly like that. You'll need to work out how to get the contents of the data at that URL into the request body. That would be more of a question for using curl itself though, so I can't offer too much support for that, as that's not made by Dropbox. The lack of a name and extension on the source URL itself wouldn't matter though, as the destination path is set by the initial call to /2/files/get_temporary_upload_link anyway.
And regarding using the URL directly with /2/files/save_url, are you referring to using large URL that starts with "data:" specifically? That wouldn't be officially supported unfortunately. Otherwise, please share a sample and I'll be happy to look into why it's failing.
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!