instance method
byte_size
Ruby on Rails edge
Since edgeSignature
byte_size()
Returns the combined size in bytes of all attached blobs.
document.images.byte_size # => 2048
Source
# File activestorage/lib/active_storage/attached/many.rb, line 83
def byte_size
blobs.pluck(:byte_size).sum
end
Defined in activestorage/lib/active_storage/attached/many.rb line 83
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveStorage::Attached::Many