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



44
45
46
47
48
49
50
51
# File 'lib/carrierwave/sanitized_file.rb', line 44

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