问题
I want to have a link to download a file from Dropbox that prompts the user instead of displaying the file in the browser. This probably requires setting a content-disposition header to 'attachment'.
I'm currently using the dropbox media URL as described here:
https://www.dropbox.com/developers/reference/api#media
It seems my alternative might be to create a proxy, but I'd obviously like to avoid that.
Is there a way to get this behavior from a direct Dropbox link?
回答1:
Found the answer myself.
As documented here:
https://www.dropbox.com/help/201
just add dl=1 to the URL.
来源:https://stackoverflow.com/questions/8992284/prompt-user-to-save-on-download-from-dropbox