Class: Files::FileUploadPart
- Inherits:
-
Object
- Object
- Files::FileUploadPart
- Defined in:
- lib/files.com/models/file_upload_part.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#action ⇒ Object
string - Type of upload.
-
#ask_about_overwrites ⇒ Object
boolean - If ‘true`, this file exists and you may wish to ask the user for overwrite confirmation.
-
#available_parts ⇒ Object
int64 - Number of parts in the upload.
-
#expires ⇒ Object
string - Date/time of when this Upload part expires and the URL cannot be used any more.
-
#headers ⇒ Object
object - Additional upload headers to provide as part of the upload.
-
#http_method ⇒ Object
string - HTTP Method to use for uploading the part, usually ‘PUT`.
-
#initialize(attributes = {}, options = {}) ⇒ FileUploadPart
constructor
A new instance of FileUploadPart.
-
#next_partsize ⇒ Object
int64 - Size in bytes for this part.
-
#parallel_parts ⇒ Object
boolean - If ‘true`, multiple parts may be uploaded in parallel.
-
#parameters ⇒ Object
object - Additional HTTP parameters to send with the upload.
-
#part_number ⇒ Object
int64 - Number of this upload part.
-
#partsize ⇒ Object
int64 - Size in bytes for the next upload part.
-
#path ⇒ Object
string - New file path This must be slash-delimited, but it must neither start nor end with a slash.
-
#ref ⇒ Object
string - Reference name for this upload part.
-
#retry_parts ⇒ Object
boolean - If ‘true`, parts may be retried.
-
#send ⇒ Object
object - Content-Type and File to send.
-
#upload_uri ⇒ Object
string - URI to upload this part to.
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 = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (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 |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/files.com/models/file_upload_part.rb', line 5 def @options end |
Instance Method Details
#action ⇒ Object
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_overwrites ⇒ Object
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_parts ⇒ Object
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 |
#expires ⇒ Object
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 |
#headers ⇒ Object
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_method ⇒ Object
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_partsize ⇒ Object
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_parts ⇒ Object
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 |
#parameters ⇒ Object
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_number ⇒ Object
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 |
#partsize ⇒ Object
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 |
#path ⇒ Object
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 |
#ref ⇒ Object
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_parts ⇒ Object
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 |
#send ⇒ Object
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_uri ⇒ Object
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 |