Class AbstractUploadBuilder
Easily create a multipart uploader used to quickly and reliably upload a large file or data stream to Amazon S3 using multipart uploads
Direct known subclasses
Aws\Glacier\Model\MultipartUpload\UploadBuilder
,
Aws\S3\Model\MultipartUpload\UploadBuilder
Namespace: Aws\Common\Model\MultipartUpload
Located at Aws/Common/Model/MultipartUpload/AbstractUploadBuilder.php
Methods summary
-
public static
newInstance ( )
Return a new instance of the UploadBuilder
-
public
setClient ( Aws\Common\Client\AwsClientInterface $client )
Set the client used to connect to the AWS service
-
public
resumeFrom ( TransferStateInterface|string $state )
Set the state of the upload. This is useful for resuming from a previously started multipart upload. You must use a local file stream as the data source if you wish to resume from a previous upload.
-
public
setSource ( resource|string|EntityBody $source )
Set the data source of the transfer
-
public
setHeaders ( array $headers )
Specify the headers to set on the upload
-
abstract public
build ( )
Build the appropriate uploader based on the builder options
-
abstract protected
initiateMultipartUpload ( )
Initiate the multipart upload
Methods detail
Return a new instance of the UploadBuilder
Returns
static
Set the client used to connect to the AWS service
Parameters
- $client
Aws\Common\Client\AwsClientInterface
$client Client to use
Returns
mixed
$this
Set the state of the upload. This is useful for resuming from a previously started multipart upload. You must use a local file stream as the data source if you wish to resume from a previous upload.
Parameters
- $state
Aws\Common\Model\MultipartUpload\TransferStateInterface
|string
$state Pass a TransferStateInterface object or the ID of the initiated multipart upload. When an ID is passed, the builder will create a state object using the data from a ListParts API response.
Returns
mixed
$this
Set the data source of the transfer
Parameters
- $source
resource|string|
Guzzle\Http\EntityBody
$source Source of the transfer. Pass a string to transfer from a file on disk. You can also stream from a resource returned from fopen or a GuzzleGuzzle\Http\EntityBody
object.
Returns
mixed
$this
Throws
Specify the headers to set on the upload
Parameters
- $headers
array
$headers Headers to add to the uploaded object
Returns
mixed
$this
Build the appropriate uploader based on the builder options
Returns
abstract protected
Aws\Common\Model\MultipartUpload\TransferStateInterface
initiateMultipartUpload( )
Magic methods summary
Properties summary
protected
|
$client |
#
Client used to transfer requests |
protected
|
$state |
#
State of the transfer |
protected
|
$source |
#
Source of the data |
protected
array
|
$headers |
#
Array of headers to set on the object |