Copyurl --auto-filename could be cleverer, and respect the HTTP Content-Disposition optional directive 'filename'

Hey!

I've checked the github issue queue, and this forum, and hadn't been able to find anything on this.

Looking through the MDN Content-Disposition Docs (I would link, but was not allowed)...

Content-Disposition: attachment; filename="filename.jpg"

would set a filename different from the url when a user in a browser clicks 'save as'. I would expect --auto-filename to respect that header if it's been set, it sounds like that setting should do that.

Instead, as per the copyurl docs, it does:

  -a, --auto-filename    Get the file name from the URL and use it for destination file path

Any reason rclone could not get a little cleverer here and respect the filename directive, if set?

FTR, I've added a PR on this issue. I changed my thinking a little, and gone for a new switch that depends on --auto-filename being active.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.