Skip to content

Commit

Permalink
Fix upload-directory command
Browse files Browse the repository at this point in the history
- was using incorrect namespace
  • Loading branch information
iamlili authored Jun 1, 2021
1 parent c6c23f1 commit a6e0ec6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/class-wp-cli-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace S3_Uploads;

use Aws\Command;
use Aws\S3\Transfer;
use Exception;
use WP_CLI;
Expand Down Expand Up @@ -206,7 +207,7 @@ public function upload_directory( array $args, array $args_assoc ) {
$transfer_args = [
'concurrency' => $args_assoc['concurrency'],
'debug' => (bool) $args_assoc['verbose'],
'before' => function ( AWS\Command $command ) {
'before' => function ( Command $command ) {
if ( in_array( $command->getName(), [ 'PutObject', 'CreateMultipartUpload' ], true ) ) {
$acl = defined( 'S3_UPLOADS_OBJECT_ACL' ) ? S3_UPLOADS_OBJECT_ACL : 'public-read';
$command['ACL'] = $acl;
Expand Down

0 comments on commit a6e0ec6

Please sign in to comment.