Forum Discussion

TomH2's avatar
TomH2
New member | Level 2
7 years ago

save_url directly into folder_id

I'm trying to use the same functionality that the /upload endpoint has where you can specify which folder you want to upload into by directly using the folder_id ie 

```curl -X POST https://content.dropboxapi.com/2/files/upload \ --header 'Authorization: Bearer {token} \ --header 'Content-Type: application/octet-stream' \ --header 'Dropbox-API-Arg: {"path":"id:pAAp5E_74CAAAAAAAAAAMw/nametest"}' \ --data-binary @'image.jpg'```

It looks like in all of my tests with the explorer that the save_url endpoint doesnt behave the same way and requires you to use the full path to save a url directly into a folder, which would cause me to have to make 2 api calls, one to get the metadata for the folders path, and then another to do the actual upload, which isn't ideal.

Is there something I'm doing wrong on my end? Or is this just not a supported feature?

1 Reply

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

    You're not doing anything wrong. The /2/files/save_url endpoint unfortunately just doesn't support specifying a path relative to the ID for a folder, like /2/files/upload does. I'll pass this along as a feature request, but I can't promise if or when that might be implemented.

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!