Class: BrickFTP::Types::Upload
- Inherits:
-
Struct
- Object
- Struct
- BrickFTP::Types::Upload
- Includes:
- IgnoreUndefinedAttributes
- Defined in:
- lib/brick_ftp/types/upload.rb
Overview
The upload object
ATTRIBUTE | TYPE | DESCRIPTION |
---|---|---|
ref | string | Unique identifier to reference this file upload. This identifier is needed for subsequent requests to the REST API to complete the upload or request more upload URLs. |
http_method | string | Value is PUT or POST, and is the HTTP method used when uploading the file to S3 at the upload_uri. |
upload_uri | string | The URL where the file is uploaded to. |
partsize | integer | Recommended size of upload. When uploading file pieces, the piece sizes are required to be between 5 MB and 5 GB (except the last part). This value provides a recommended size to upload for this part without adding another part. |
part_number | integer | Number of this part, which is always between 1 and 10,000, and will always be 1 for the first upload URL at the beginning of uploading a new file. |
available_parts | integer | Number of parts available for this upload. For new file uploads this value is always 10,000, but it may be smaller for other uploads. When requesting more upload URLs from the REST API, the part numbers must be between 1 and this number. |
headers | key-value pairs | A list of required headers and their exact values to send in the file upload. It may be empty if no headers with fixed values are required. |
parameters | key-value pairs | A list of required parameters and their exact values to send in the file upload. If any values are in this array, it is implied that the upload request is formatted appropriately to send form data parameters. It will always be empty if the body of the request is specified to be where the file upload data goes (see send below). |
send | key-value pairs | This is an array of values to be sent in the file upload request. Possible sub-values are partsize, partdata, file, and Content-Type:file : where to put the file data for the entire file uploadpartdata : where to put the file data for this partpartsize : where to put the size of the upload for this file partContent-Type : where to put the Content-Type of the file (which can have no bearing on the file's actual type)Possible values for these parameters: body : this information is the body of the PUT or POST requestrequired-header <header name> : this information goes in the named headerrequired-parameter <parameter name> : this information goes in the named parameter, and implies this request is formatted appropriately to send form data parameters |
path | string | Intended destination path of the file upload. Path may change upon finalization, depending on existance of another upload to the same location and the site's overwrite setting. |
action | string | Value is always write or put for this action. |
ask_about_overwrites | boolean | If true, a file by this name already exists and will be overwritten when this upload completes if it continues. |
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#ask_about_overwrites ⇒ Object
Returns the value of attribute ask_about_overwrites.
-
#available_parts ⇒ Object
Returns the value of attribute available_parts.
-
#expires ⇒ Object
Returns the value of attribute expires.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#http_method ⇒ Object
Returns the value of attribute http_method.
-
#next_partsize ⇒ Object
Returns the value of attribute next_partsize.
-
#parameters ⇒ Object
Returns the value of attribute parameters.
-
#part_number ⇒ Object
Returns the value of attribute part_number.
-
#partsize ⇒ Object
Returns the value of attribute partsize.
-
#path ⇒ Object
Returns the value of attribute path.
-
#ref ⇒ Object
Returns the value of attribute ref.
-
#send ⇒ Object
Returns the value of attribute send.
-
#upload_uri ⇒ Object
Returns the value of attribute upload_uri.
Method Summary
Methods included from IgnoreUndefinedAttributes
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def action @action end |
#ask_about_overwrites ⇒ Object
Returns the value of attribute ask_about_overwrites
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def ask_about_overwrites @ask_about_overwrites end |
#available_parts ⇒ Object
Returns the value of attribute available_parts
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def available_parts @available_parts end |
#expires ⇒ Object
Returns the value of attribute expires
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def expires @expires end |
#headers ⇒ Object
Returns the value of attribute headers
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def headers @headers end |
#http_method ⇒ Object
Returns the value of attribute http_method
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def http_method @http_method end |
#next_partsize ⇒ Object
Returns the value of attribute next_partsize
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def next_partsize @next_partsize end |
#parameters ⇒ Object
Returns the value of attribute parameters
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def parameters @parameters end |
#part_number ⇒ Object
Returns the value of attribute part_number
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def part_number @part_number end |
#partsize ⇒ Object
Returns the value of attribute partsize
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def partsize @partsize end |
#path ⇒ Object
Returns the value of attribute path
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def path @path end |
#ref ⇒ Object
Returns the value of attribute ref
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def ref @ref end |
#send ⇒ Object
Returns the value of attribute send
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def send @send end |
#upload_uri ⇒ Object
Returns the value of attribute upload_uri
26 27 28 |
# File 'lib/brick_ftp/types/upload.rb', line 26 def upload_uri @upload_uri end |