Class: Services::UploadFile
- Inherits:
-
File
- Object
- File
- Services::UploadFile
- Defined in:
- app/utils/services/upload_file.rb
Instance Attribute Summary collapse
-
#content_type ⇒ Object
readonly
Returns the value of attribute content_type.
-
#original_filename ⇒ Object
readonly
Returns the value of attribute original_filename.
Instance Method Summary collapse
-
#initialize(filename) ⇒ UploadFile
constructor
A new instance of UploadFile.
Constructor Details
#initialize(filename) ⇒ UploadFile
Returns a new instance of UploadFile.
6 7 8 9 10 |
# File 'app/utils/services/upload_file.rb', line 6 def initialize(filename) super(filename, "rb") @original_filename = File.basename(filename) @content_type = "application/zip" end |
Instance Attribute Details
#content_type ⇒ Object (readonly)
Returns the value of attribute content_type.
4 5 6 |
# File 'app/utils/services/upload_file.rb', line 4 def content_type @content_type end |
#original_filename ⇒ Object (readonly)
Returns the value of attribute original_filename.
4 5 6 |
# File 'app/utils/services/upload_file.rb', line 4 def original_filename @original_filename end |