/** * Creates a multipart upload for a Glacier archive. * * The valid configuration options are as follows: * * - account_id: (string, default=string('-')) Account ID for the archive * being uploaded, if different from the account making the request. * - archive_description: (string) Description of the archive. * - before_complete: (callable) Callback to invoke before the * `CompleteMultipartUpload` operation. The callback should have a * function signature like `function (Aws\Command $command) {...}`. * - before_initiate: (callable) Callback to invoke before the * `InitiateMultipartUpload` operation. The callback should have a * function signature like `function (Aws\Command $command) {...}`. * - before_upload: (callable) Callback to invoke before any * `UploadMultipartPart` operations. The callback should have a function * signature like `function (Aws\Command $command) {...}`. * - concurrency: (int, default=int(3)) Maximum number of concurrent * `UploadMultipartPart` operations allowed during the multipart upload. * - part_size: (int, default=int(1048576)) Part size, in bytes, to use when * doing a multipart upload. This must between 1 MB and 4 GB, and must be * a power of 2 (in megabytes). * - state: (Aws\Multipart\UploadState) An object that represents the state * of the multipart upload and that is used to resume a previous upload. * When this options is provided, the `account_id`, `key`, and `part_size` * options are ignored. * - vault_name: (string, required) Vault name to use for the archive being * uploaded. * * @param GlacierClient $client Client used for the upload. * @param mixed $source Source of the data to upload. * @param array $config Configuration used to perform the upload. */ public function __construct(GlacierClient $client, $source, array $config = []) { parent::__construct($client, $source, $config + ['account_id' => '-', 'vault_name' => null]); }
/** * Creates a multipart upload for an S3 object. * * The valid configuration options are as follows: * * - acl: (string) ACL to set on the object being upload. Objects are * private by default. * - before_complete: (callable) Callback to invoke before the * `CompleteMultipartUpload` operation. The callback should have a * function signature like `function (Aws\Command $command) {...}`. * - before_initiate: (callable) Callback to invoke before the * `CreateMultipartUpload` operation. The callback should have a function * signature like `function (Aws\Command $command) {...}`. * - before_upload: (callable) Callback to invoke before any `UploadPart` * operations. The callback should have a function signature like * `function (Aws\Command $command) {...}`. * - bucket: (string, required) Name of the bucket to which the object is * being uploaded. * - concurrency: (int, default=int(5)) Maximum number of concurrent * `UploadPart` operations allowed during the multipart upload. * - key: (string, required) Key to use for the object being uploaded. * - part_size: (int, default=int(5242880)) Part size, in bytes, to use when * doing a multipart upload. This must between 5 MB and 5 GB, inclusive. * - state: (Aws\Multipart\UploadState) An object that represents the state * of the multipart upload and that is used to resume a previous upload. * When this option is provided, the `bucket`, `key`, and `part_size` * options are ignored. * * @param S3ClientInterface $client Client used for the upload. * @param mixed $source Source of the data to upload. * @param array $config Configuration used to perform the upload. */ public function __construct(S3ClientInterface $client, $source, array $config = []) { parent::__construct($client, $source, array_change_key_case($config) + ['bucket' => null, 'key' => null]); }