class Paperclip::AbstractAdapter

Constants

OS_RESTRICTED_CHARACTERS

Attributes

content_type[R]
original_filename[R]
size[R]

Public Instance Methods

fingerprint() click to toggle source
# File lib/paperclip/io_adapters/abstract_adapter.rb, line 10
def fingerprint
  @fingerprint ||= Digest::MD5.file(path).to_s
end
inspect() click to toggle source
# File lib/paperclip/io_adapters/abstract_adapter.rb, line 18
def inspect
  "#{self.class}: #{self.original_filename}"
end
original_filename=(new_filename) click to toggle source
# File lib/paperclip/io_adapters/abstract_adapter.rb, line 22
def original_filename=(new_filename)
  @original_filename = new_filename.gsub(OS_RESTRICTED_CHARACTERS, "_")
end
read(length = nil, buffer = nil) click to toggle source
# File lib/paperclip/io_adapters/abstract_adapter.rb, line 14
def read(length = nil, buffer = nil)
  @tempfile.read(length, buffer)
end