Class: UploadedFile
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- UploadedFile
- Defined in:
- app/models/uploaded_file.rb
Overview
Uploaded file
Attributes:
[SimpleFileUploader]
agent_id [Agent], optional
biovision_component_id [BiovisionComponent]
checksum [String]
created_at [DateTime]
data [jsonb]
description [String], optional
ip_address_id [IpAddress], optional
object_count [Integer]
updated_at [DateTime]
user_id [User], optional
uuid [uuid]
Constant Summary collapse
- META_LIMIT =
255
Class Method Summary collapse
Instance Method Summary collapse
Methods included from HasOwner
Class Method Details
.entity_parameters ⇒ Object
43 44 45 |
# File 'app/models/uploaded_file.rb', line 43 def self.entity_parameters %i[attachment description] end |
Instance Method Details
#file_size ⇒ Object
51 52 53 |
# File 'app/models/uploaded_file.rb', line 51 def file_size File.size(.path) end |
#name ⇒ Object
47 48 49 |
# File 'app/models/uploaded_file.rb', line 47 def name File.basename(.path) end |