Method: Paperclip::Attachment#size

Defined in:
lib/paperclip/attachment.rb

#sizeObject

Returns the size of the file as originally assigned, and lives in the <attachment>_file_size attribute of the model.



177
178
179
# File 'lib/paperclip/attachment.rb', line 177

def size
  instance_read(:file_size) || (@queued_for_write[:original] && @queued_for_write[:original].size)
end