| @@ -48,8 +48,10 @@ | ||
| 48 | 48 | * When this option is provided, the `bucket`, `key`, and `part_size` |
| 49 | 49 | * options are ignored. |
| 50 | 50 | * - source_metadata: (Aws\ResultInterface) An object that represents the |
| 51 | 51 | * result of executing a HeadObject command on the copy source. |
| 52 | + * - display_progress: (boolean) Set true to track status in 1/8th increments | |
| 53 | + * for upload. | |
| 52 | 54 | * |
| 53 | 55 | * @param S3ClientInterface $client Client used for the upload. |
| 54 | 56 | * @param string|array $source Location of the data to be copied (in the |
| 55 | 57 | * form /<bucket>/<key>). If the key contains a '?' |
| @@ -64,8 +66,11 @@ | ||
| 64 | 66 | } else { |
| 65 | 67 | $this->source = $this->getInputSource($source); |
| 66 | 68 | } |
| 67 | 69 | parent::__construct($client, \array_change_key_case($config) + ['source_metadata' => null]); |
| 70 | + if ($this->displayProgress) { | |
| 71 | + $this->getState()->setProgressThresholds($this->sourceMetadata["ContentLength"]); | |
| 72 | + } | |
| 68 | 73 | } |
| 69 | 74 | /** |
| 70 | 75 | * An alias of the self::upload method. |
| 71 | 76 | * |