Class: Files::FilePartUpload

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of FilePartUpload.



7
8
9
10
# File 'lib/files.com/models/file_part_upload.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_part_upload.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#actionObject

string - Type of upload



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

def action
  @attributes[:action]
end

#ask_about_overwritesObject

boolean - If false, rename conflicting files instead of asking for overwrite confirmation



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

def ask_about_overwrites
  @attributes[:ask_about_overwrites]
end

#available_partsObject

string - Currently unused



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

def available_parts
  @attributes[:available_parts]
end

#expiresObject

string - Currently unused



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

def expires
  @attributes[:expires]
end

#headersObject

object - Additional upload headers



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

def headers
  @attributes[:headers]
end

#http_methodObject

string - Upload method, usually POST



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

def http_method
  @attributes[:http_method]
end

#next_partsizeObject

string - Currently unused



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

def next_partsize
  @attributes[:next_partsize]
end

#parallel_partsObject

boolean - If true, parts may be uploaded in parallel



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

def parallel_parts
  @attributes[:parallel_parts]
end

#parametersObject

string - Additional upload parameters



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

def parameters
  @attributes[:parameters]
end

#part_numberObject

string - Currently unused



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

def part_number
  @attributes[:part_number]
end

#partsizeObject

string - Currently unused



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

def partsize
  @attributes[:partsize]
end

#pathObject

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



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

def path
  @attributes[:path]
end

#refObject

string - Reference name for this upload part



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

def ref
  @attributes[:ref]
end

#sendObject

object - Content-Type and File to send



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

def send
  @attributes[:send]
end

#upload_uriObject

string - URI to upload this part to



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

def upload_uri
  @attributes[:upload_uri]
end