Class: Paperclip::S3DU::S3DirectUpload

Inherits:
Object
  • Object
show all
Defined in:
lib/paperclip_s3du/s3_direct_upload.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = {}) ⇒ S3DirectUpload

Returns a new instance of S3DirectUpload.



6
7
8
9
10
11
# File 'lib/paperclip_s3du/s3_direct_upload.rb', line 6

def initialize hash = {}
  @path = hash[:file_path]
  @size = hash[:file_size]
  @content_type = hash[:content_type]
  @fingerprint = hash[:fingerprint]
end

Instance Attribute Details

#content_typeObject (readonly)

Returns the value of attribute content_type.



4
5
6
# File 'lib/paperclip_s3du/s3_direct_upload.rb', line 4

def content_type
  @content_type
end

#fingerprintObject (readonly)

Returns the value of attribute fingerprint.



4
5
6
# File 'lib/paperclip_s3du/s3_direct_upload.rb', line 4

def fingerprint
  @fingerprint
end

#pathObject (readonly)

Returns the value of attribute path.



4
5
6
# File 'lib/paperclip_s3du/s3_direct_upload.rb', line 4

def path
  @path
end

#sizeObject (readonly)

Returns the value of attribute size.



4
5
6
# File 'lib/paperclip_s3du/s3_direct_upload.rb', line 4

def size
  @size
end

Instance Method Details

#original_filenameObject



13
14
15
# File 'lib/paperclip_s3du/s3_direct_upload.rb', line 13

def original_filename
  File.basename @path
end