Forum Discussion

nukkerone's avatar
nukkerone
New member | Level 2
10 years ago

Using save_url endpoint w/out knowing the file type

Hi everyone, heres the thing:

 

I have an app where user can provide links to resources (direct download). These resources could be anything from an image, to fonts or zip files. We actually don't know the specifi filetype of each of these files.

 

Within the app, other users can save these files to their dropbox, and for that we would like to use your save_url endpoint, but this requires to specify the filetype. There is a way to avoid providing that to the endpoint? If not, is there any other way, using dropbox api, to overcome this issue?

 

Thanks.

Gabriel.

1 Reply

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

    Hi Gabrel, the /save_url endpoint does require a path for where the file should be saved in the user's Dropbox account, including the file name, but this doesn't technically require that the app include the file extension.

     

    So, you can omit the file extension, but that would certainly be non-ideal for the user, as they'd have to know or guess the extension to easily use the file later on.

     

    Ideally, you can get the file extension from the source URL you're given, and use that on the path you give to the Dropbox API. Otherwise though, the API doesn't offer the ability to automatically guess and add the extension for you.

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!