Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

original_filename should follow Content-Disposition #2212

Closed
bbtfr opened this issue May 14, 2016 · 2 comments
Closed

original_filename should follow Content-Disposition #2212

bbtfr opened this issue May 14, 2016 · 2 comments

Comments

@bbtfr
Copy link

bbtfr commented May 14, 2016

Here: https://github.com/thoughtbot/paperclip/blob/master/lib/paperclip/io_adapters/uri_adapter.rb#L21

I think if we download a file from web, and there is a filename set in Content-Disposition in http response, original_filename should follow it.

My case is, I have a url like http://example.com/get?token=xxxx, if I set this string directly to attachment, all my attachments are named get, without extension, but it does have a filename in Content-Disposition. So I have to create a tmpfile manually and to set the filename, because files without extension are unreadable on Windows.

@tute
Copy link
Contributor

tute commented May 14, 2016

Yep! We are fixing this in #2210. Thanks for reporting!

@tute tute closed this as completed May 14, 2016
@bbtfr
Copy link
Author

bbtfr commented May 16, 2016

Thanks, just noticed that there is already a PR for it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants