Class: Services::UploadFile

Inherits:
File
  • Object
show all
Defined in:
app/utils/services/upload_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject (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_filenameObject (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