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

Commit

Permalink
Ignore invalid Content-Disposition header (#2284)
Browse files Browse the repository at this point in the history
* ignore invalid content-disposition header

[fixes #2283]
  • Loading branch information
arokettu authored and tute committed Aug 24, 2016
1 parent 4b617ff commit a49c59f
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit a49c59f

Please sign in to comment.