Method: CarrierWave::SanitizedFile#original_filename

Defined in:
lib/carrierwave/sanitized_file.rb

#original_filenameObject

Returns the filename as is, without sanitizing it.

Returns

String

the unsanitized filename



40
41
42
43
44
45
46
47
# File 'lib/carrierwave/sanitized_file.rb', line 40

def original_filename
  return @original_filename if @original_filename
  if @file and @file.respond_to?(:original_filename)
    @file.original_filename
  elsif path
    File.basename(path)
  end
end

Comments