Class: Vzaar::Uploaders::S3

Inherits:
Struct
  • Object
show all
Defined in:
lib/vzaar/uploaders/s3.rb

Defined Under Namespace

Classes: VirtualFile

Constant Summary collapse

SEND_TIMEOUT =
1800

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



3
4
5
# File 'lib/vzaar/uploaders/s3.rb', line 3

def path
  @path
end

#signatureObject

Returns the value of attribute signature

Returns:

  • (Object)

    the current value of signature



3
4
5
# File 'lib/vzaar/uploaders/s3.rb', line 3

def signature
  @signature
end

Instance Method Details

#uploadObject



6
7
8
9
10
11
12
# File 'lib/vzaar/uploaders/s3.rb', line 6

def upload
  if signature.chunk_size.to_s.empty?
    single_part_upload
  else
    multipart_upload
  end
end