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

[backport] The uri io adapter should use the content-disposition filename #2250

Merged

Conversation

netmask
Copy link
Contributor

@netmask netmask commented Jul 14, 2016

@tute port from #2210

  • The uri io adapter now seeks for the content-disposition header
    if this is pressent the value filename is taken instead of the
    last path segment for the resource file name
  • Fix style comments
  • Applied the Tute Costa refactor to URI Adapter.
  • Added entry to the NEWS file.
  • Removed editor tracking file
  • Fix test cases

context "a url with restricted characters in the filename" do
before do
Paperclip::UriAdapter.any_instance.stubs(:download_content).returns(StringIO.new("xxx"))
Paperclip::UriAdapter.any_instance.
stubs(:download_content).returns(@open_return)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 2 (not 4) spaces for indenting an expression spanning multiple lines.

- The uri io adapter now seeks for the content-disposition header
  if this is pressent the value filename is taken instead of the
  last path segment for the resource file name
- Fix style comments
- Applied the Tute Costa refactor to URI Adapter.
- Added entry to  the NEWS file.
- Removed editor tracking file
- Fix test cases
@netmask netmask force-pushed the port/uri_adapter_use_content_disposition branch from 5077e20 to a008c68 Compare July 14, 2016 18:52
@tute tute merged commit e367efc into thoughtbot:master Jul 23, 2016
@tute
Copy link
Contributor

tute commented Jul 23, 2016

Thank you very much! 👏

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

Successfully merging this pull request may close these issues.

3 participants