module CarrierWave::Uploader::Proxy

Public Instance Methods

blank?() click to toggle source

Returns

Boolean

Whether the uploaded file is blank

# File lib/carrierwave/uploader/proxy.rb, line 11
def blank?
  file.blank?
end
current_path() click to toggle source

Returns

String

the path where the file is currently located.

# File lib/carrierwave/uploader/proxy.rb, line 20
def current_path
  file.path if file.respond_to?(:path)
end
Also aliased as: path
identifier() click to toggle source

Returns a string that uniquely identifies the last stored file

Returns

String

uniquely identifies a file

# File lib/carrierwave/uploader/proxy.rb, line 33
def identifier
  storage.identifier if storage.respond_to?(:identifier)
end
path() click to toggle source
Alias for: current_path
read() click to toggle source

Read the contents of the file

Returns

String

contents of the file

# File lib/carrierwave/uploader/proxy.rb, line 44
def read
  file.read if file.respond_to?(:read)
end
size() click to toggle source

Fetches the size of the currently stored/cached file

Returns

Integer

size of the file

# File lib/carrierwave/uploader/proxy.rb, line 55
def size
  file.respond_to?(:size) ? file.size : 0
end