| @@ -52,8 +52,10 @@ | ||
| 52 | 52 | * - state: (Aws\Multipart\UploadState) An object that represents the state |
| 53 | 53 | * of the multipart upload and that is used to resume a previous upload. |
| 54 | 54 | * When this option is provided, the `bucket`, `key`, and `part_size` |
| 55 | 55 | * options are ignored. |
| 56 | + * - track_upload: (boolean) Set true to track status in 1/8th increments | |
| 57 | + * for upload. | |
| 56 | 58 | * |
| 57 | 59 | * @param S3ClientInterface $client Client used for the upload. |
| 58 | 60 | * @param mixed $source Source of the data to upload. |
| 59 | 61 | * @param array $config Configuration used to perform the upload. |
| @@ -60,8 +62,11 @@ | ||
| 60 | 62 | */ |
| 61 | 63 | public function __construct(S3ClientInterface $client, $source, array $config = []) |
| 62 | 64 | { |
| 63 | 65 | parent::__construct($client, $source, \array_change_key_case($config) + ['bucket' => null, 'key' => null, 'exception_class' => S3MultipartUploadException::class]); |
| 66 | + if ($this->displayProgress) { | |
| 67 | + $this->getState()->setProgressThresholds($this->source->getSize()); | |
| 68 | + } | |
| 64 | 69 | } |
| 65 | 70 | protected function loadUploadWorkflowInfo() |
| 66 | 71 | { |
| 67 | 72 | return ['command' => ['initiate' => 'CreateMultipartUpload', 'upload' => 'UploadPart', 'complete' => 'CompleteMultipartUpload'], 'id' => ['bucket' => 'Bucket', 'key' => 'Key', 'upload_id' => 'UploadId'], 'part_num' => 'PartNumber']; |