Class: BrickFTP::Types::Upload

Inherits:
Struct
  • Object
show all
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 upload
partdata: where to put the file data for this part
partsize: where to put the size of the upload for this file part
Content-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 request
required-header <header name>: this information goes in the named header
required-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.

See Also:

Instance Attribute Summary collapse

Method Summary

Methods included from IgnoreUndefinedAttributes

#initialize

Instance Attribute Details

#actionObject

Returns the value of attribute action

Returns:

  • (Object)

    the current value of action



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def action
  @action
end

#ask_about_overwritesObject

Returns the value of attribute ask_about_overwrites

Returns:

  • (Object)

    the current value of ask_about_overwrites



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def ask_about_overwrites
  @ask_about_overwrites
end

#available_partsObject

Returns the value of attribute available_parts

Returns:

  • (Object)

    the current value of available_parts



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def available_parts
  @available_parts
end

#expiresObject

Returns the value of attribute expires

Returns:

  • (Object)

    the current value of expires



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def expires
  @expires
end

#headersObject

Returns the value of attribute headers

Returns:

  • (Object)

    the current value of headers



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def headers
  @headers
end

#http_methodObject

Returns the value of attribute http_method

Returns:

  • (Object)

    the current value of http_method



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def http_method
  @http_method
end

#next_partsizeObject

Returns the value of attribute next_partsize

Returns:

  • (Object)

    the current value of next_partsize



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def next_partsize
  @next_partsize
end

#parametersObject

Returns the value of attribute parameters

Returns:

  • (Object)

    the current value of parameters



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def parameters
  @parameters
end

#part_numberObject

Returns the value of attribute part_number

Returns:

  • (Object)

    the current value of part_number



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def part_number
  @part_number
end

#partsizeObject

Returns the value of attribute partsize

Returns:

  • (Object)

    the current value of partsize



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def partsize
  @partsize
end

#pathObject

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def path
  @path
end

#refObject

Returns the value of attribute ref

Returns:

  • (Object)

    the current value of ref



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def ref
  @ref
end

#sendObject

Returns the value of attribute send

Returns:

  • (Object)

    the current value of send



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def send
  @send
end

#upload_uriObject

Returns the value of attribute upload_uri

Returns:

  • (Object)

    the current value of upload_uri



26
27
28
# File 'lib/brick_ftp/types/upload.rb', line 26

def upload_uri
  @upload_uri
end