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

Release 5.1.1 #2517

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions NEWS
Expand Up @@ -8,6 +8,10 @@ master:
* (port from 4.3) Uri io adapter uses the content-disposition filename (#2250)
* General refactors and documentation improvements

5.1.1 (2017-12-14)

* Bug Fix: Backport "Ignore invalid content-disposition header (#2284)" to 5.1

5.0.0 (2016-07-01):

* Improvement: Add `read_timeout` configuration for URI Adapter download_content method.
Expand Down
5 changes: 3 additions & 2 deletions lib/paperclip/io_adapters/uri_adapter.rb
Expand Up @@ -29,8 +29,9 @@ def content_type_from_content

def filename_from_content_disposition
if @content.meta.has_key?("content-disposition")
@content.meta["content-disposition"].
match(/filename="([^"]*)"/)[1]
matches = @content.meta["content-disposition"].
match(/filename="([^"]*)"/)
matches[1] if matches
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/paperclip/version.rb
@@ -1,5 +1,5 @@
module Paperclip
unless defined?(Paperclip::VERSION)
VERSION = "5.1.0".freeze
VERSION = "5.1.1".freeze
end
end