cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using save_url endpoint w/out knowing the file type

Using save_url endpoint w/out knowing the file type

nukkerone
New member | Level 2

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 1

Greg-DB
Dropbox Staff

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.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?