Class PostObjectV4
- Aws\S3\PostObjectV4 uses Aws\Signature\SignatureTrait
- Namespace: Aws\S3
- Link: http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectPOST.html
- Link: http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html
- Located at S3/PostObjectV4.php
Encapsulates the logic for getting the data for an S3 object POST upload form
Methods Summary
-
__construct ( Aws\S3\S3ClientInterface $client, string $bucket, array $formInputs, array $options = [], mixed $expiration = '+1 hours' )
Constructs the PostObject.
-
getClient ( )
Gets the S3 client.
-
getBucket ( )
Gets the bucket name.
-
getFormAttributes ( )
Gets the form attributes as an array.
-
setFormAttribute ( string $attribute, string $value )
Set a form attribute.
-
getFormInputs ( )
Gets the form inputs as an array.
-
setFormInput ( string $field, string $value )
Set a form input.
Methods Details
__construct (
Aws\S3\S3ClientInterface
$client,
string
$bucket,
array
$formInputs,
array
$options = [],
mixed
$expiration = '+1 hours'
)
Constructs the PostObject.
The options array accepts the following keys:
Parameters
Aws\S3\S3ClientInterface |
$client | Client used with the POST object |
string | $bucket | Bucket to use |
array | $formInputs | Associative array of form input fields. |
array | $options = [] | Policy condition options |
mixed | $expiration = '+1 hours' | Upload expiration time value. By default: 1 hour valid period. |
Link
Aws\S3\S3ClientInterface
getClient (
)
string getBucket ( )
Gets the bucket name.
Returns
string |
array getFormAttributes ( )
Gets the form attributes as an array.
Returns
array |
setFormAttribute ( string $attribute, string $value )
Set a form attribute.
Parameters
string | $attribute | Form attribute to set. |
string | $value | Value to set. |
array getFormInputs ( )
Gets the form inputs as an array.
Returns
array |
setFormInput ( string $field, string $value )
Set a form input.
Parameters
string | $field | Field name to set |
string | $value | Value to set. |