uploadDirectory() public method

Recursively uploads all files in a given directory to a given bucket.
See also: Aws\S3\S3Sync\S3Sync for more options and customization
public uploadDirectory ( string $directory, string $bucket, string $keyPrefix = null, array $options = [] )
$directory string Full path to a directory to upload
$bucket string Name of the bucket
$keyPrefix string Virtual directory key prefix to add to each upload
$options array Associative array of upload options - params: Array of parameters to use with each PutObject operation performed during the transfer - base_dir: Base directory to remove from each object key - force: Set to true to upload every file, even if the file is already in Amazon S3 and has not changed - concurrency: Maximum number of parallel uploads (defaults to 10) - debug: Set to true or an fopen resource to enable debug mode to print information about each upload - multipart_upload_size: When the size of a file exceeds this value, the file will be uploaded using a multipart upload.
Ejemplo n.º 1
0
 /**
  * Recursively uploads all files in a given directory to a given bucket.
  *
  * @param string $directory Full path to a directory to upload
  * @param string $bucket    Name of the bucket
  * @param string $keyPrefix Virtual directory key prefix to add to each upload
  * @param array  $options   Associative array of upload options
  *                          - params: Array of parameters to use with each PutObject operation performed during the transfer
  *                          - base_dir: Base directory to remove from each object key
  *                          - force: Set to true to upload every file, even if the file is already in Amazon S3 and has not changed
  *                          - concurrency: Maximum number of parallel uploads (defaults to 10)
  *                          - debug: Set to true or an fopen resource to enable debug mode to print information about each upload
  *                          - multipart_upload_size: When the size of a file exceeds this value, the file will be uploaded using a
  *                          multipart upload.
  *
  * @see Aws\S3\S3Sync\S3Sync for more options and customization
  */
 public function uploadDirectory($directory, $bucket, $keyPrefix = null, array $options = [])
 {
     $this->instance->uploadDirectory($directory, $bucket, $keyPrefix, $options);
 }