Class: Files::FileUploadPart

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/file_upload_part.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ FileUploadPart

Returns a new instance of FileUploadPart.



7
8
9
10
# File 'lib/files.com/models/file_upload_part.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/file_upload_part.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/file_upload_part.rb', line 5

def options
  @options
end

Instance Method Details

#actionObject

string - Type of upload



18
19
20
# File 'lib/files.com/models/file_upload_part.rb', line 18

def action
  @attributes[:action]
end

#ask_about_overwritesObject

boolean - If ‘true`, this file exists and you may wish to ask the user for overwrite confirmation



23
24
25
# File 'lib/files.com/models/file_upload_part.rb', line 23

def ask_about_overwrites
  @attributes[:ask_about_overwrites]
end

#available_partsObject

int64 - Number of parts in the upload



28
29
30
# File 'lib/files.com/models/file_upload_part.rb', line 28

def available_parts
  @attributes[:available_parts]
end

#expiresObject

string - Date/time of when this Upload part expires and the URL cannot be used any more



33
34
35
# File 'lib/files.com/models/file_upload_part.rb', line 33

def expires
  @attributes[:expires]
end

#headersObject

object - Additional upload headers to provide as part of the upload



38
39
40
# File 'lib/files.com/models/file_upload_part.rb', line 38

def headers
  @attributes[:headers]
end

#http_methodObject

string - HTTP Method to use for uploading the part, usually ‘PUT`



43
44
45
# File 'lib/files.com/models/file_upload_part.rb', line 43

def http_method
  @attributes[:http_method]
end

#next_partsizeObject

int64 - Size in bytes for this part



48
49
50
# File 'lib/files.com/models/file_upload_part.rb', line 48

def next_partsize
  @attributes[:next_partsize]
end

#parallel_partsObject

boolean - If ‘true`, multiple parts may be uploaded in parallel. If `false`, be sure to only upload one part at a time, in order.



53
54
55
# File 'lib/files.com/models/file_upload_part.rb', line 53

def parallel_parts
  @attributes[:parallel_parts]
end

#parametersObject

object - Additional HTTP parameters to send with the upload



63
64
65
# File 'lib/files.com/models/file_upload_part.rb', line 63

def parameters
  @attributes[:parameters]
end

#part_numberObject

int64 - Number of this upload part



68
69
70
# File 'lib/files.com/models/file_upload_part.rb', line 68

def part_number
  @attributes[:part_number]
end

#partsizeObject

int64 - Size in bytes for the next upload part



73
74
75
# File 'lib/files.com/models/file_upload_part.rb', line 73

def partsize
  @attributes[:partsize]
end

#pathObject

string - New file path This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.



78
79
80
# File 'lib/files.com/models/file_upload_part.rb', line 78

def path
  @attributes[:path]
end

#refObject

string - Reference name for this upload part



83
84
85
# File 'lib/files.com/models/file_upload_part.rb', line 83

def ref
  @attributes[:ref]
end

#retry_partsObject

boolean - If ‘true`, parts may be retried. If `false`, a part cannot be retried and the upload should be restarted.



58
59
60
# File 'lib/files.com/models/file_upload_part.rb', line 58

def retry_parts
  @attributes[:retry_parts]
end

#sendObject

object - Content-Type and File to send



13
14
15
# File 'lib/files.com/models/file_upload_part.rb', line 13

def send
  @attributes[:send]
end

#upload_uriObject

string - URI to upload this part to



88
89
90
# File 'lib/files.com/models/file_upload_part.rb', line 88

def upload_uri
  @attributes[:upload_uri]
end