Skip to content

Commit

Permalink
Fix URI.decode
Browse files Browse the repository at this point in the history
URI.decode was deprecated in 2.7 and has been removed in 3.0

ruby/uri#9
  • Loading branch information
Rajesh Sharma committed Jan 20, 2022
1 parent fc2ae58 commit e1d73d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/carrierwave/support/uri_filename.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ module UriFilename
def self.filename(url)
path = url.split('?').first

URI.decode(path).gsub(/.*\/(.*?$)/, '\1')
URI.decode_www_form_component(path).gsub(/.*\/(.*?$)/, '\1')
end
end
end
end
end

0 comments on commit e1d73d9

Please sign in to comment.