Module: CarrierWave::Support::UriFilename

Defined in:
lib/carrierwave/support/uri_filename.rb

Class Method Summary collapse

Class Method Details

.filename(url) ⇒ Object



4
5
6
7
8
# File 'lib/carrierwave/support/uri_filename.rb', line 4

def self.filename(url)
  path = url.split('?').first

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