download - Content-Disposition in dropbox -


is there way rename file while downloading dropbox without changing filename :

for example : dropbox link : https://www.dropbox.com/s/uex431ou02h2m2b/300x50.gif?dl=1

and file downloaded : newnameimage.gif instead of 300x50.gif

content-disposition header didn't work me .

any ideas how ?

if you're downloading file locally should either able control name given local file, or able rename after fact. example, using curl, -jo downloads file using remote name specified in content-disposition header, while -o lets specify name:

$ curl -l -jo "https://www.dropbox.com/s/uex431ou02h2m2b/300x50.gif?dl=1" ... curl: saved filename '300x50.gif' $ ls 300x50.gif $ rm 300x50.gif $ curl -l -o "newnameimage.gif" "https://www.dropbox.com/s/uex431ou02h2m2b/300x50.gif?dl=1" ... $ ls newnameimage.gif 

alternatively, renaming after fact:

$ curl -l -jo "https://www.dropbox.com/s/uex431ou02h2m2b/300x50.gif?dl=1" ... curl: saved filename '300x50.gif' $ ls 300x50.gif $ mv 300x50.gif "newnameimage.gif" $ ls newnameimage.gif 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -