Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

jjsk's avatar
jjsk
Helpful | Level 5
8 years ago

URLs generated with files_get_temporary_link are not parsed correctly by some applications

Hi

 

I'm using files_get_temporary_link to generate a download URL for a file (active for 4 hrs). The link itself appears to lack the filenam. It just ends with long cryptic number. Some browsers do not interpret this URL correctly and save the downloaded files with strange looking/unfriendly names. For example a temp link like this

 

https://dl.dropboxusercontent.com/apitl/1/AACaHS_H4dB5wyoQGQeFrhn4lKIBU0O0COeHMBg9x3NguJg_9f2_YxKj7BlKpEprf7rAB51ikDD114BLJfWMI_Vf-Ut2OA2ylf7Sm37qL4YTuzHuGBVB1Yf0TJOQMdHa8Eo7dxKk8LMZfpbBpFTrytarDhj90XQIH8GBfxY6ti6EfKT7JKRyoL8XS1jEVHaJRGw4frO2fwS8NE8pdl01A-RZsWr9Cs5iCOZMOhpqciRXUsekMWJ1dKiB8TQl3wTN8oUGhyH3hAjn3Qra1erudf1KhNikO9jlVX4x2G5ftIvqe-jJlK4c7ZY4WlxTia5ilfVDzlynRPDelrkgjvvOQfQX

 

is saved as AACaHS_H4dB5wyoQGQeFrhn4lKIBU0O0.mp3 instead of the real file name as appears in the user's dropbox.

 

Is there any way to force   files_get_temporary_link generate a URL that ends with the actual real file name?

 

The previous dropbox API *used* to generate friendly links for temporary shares and it seemed to work very nicely.  Would you please consider returning the old style link layout?

2 Replies

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

    Thanks for the post! There isn't a way to force that, but I'll pass this along as a feature request for the old/filename in URL version, though I can't make any promises as to if/when then would be done.

     

    For reference, the filename is included in the 'Content-Disposition` header, which the HTTP client should be using, but it sounds like not all clients are using that unfortunately.

     

     

  • jjsk's avatar
    jjsk
    Helpful | Level 5
    8 years ago

    Thanks for the reply. I opened a ticket for the client program but they don't seem to quite get what the issue is. I.e. why do they need to inspect HTTP headers to find the name of the file the url points to.

     

    If this can be adjusted in the dropbox API it would probably simplify things a little. 

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

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!