diff --git a/README.md b/README.md index 2ab6cc71..b1b67de9 100644 --- a/README.md +++ b/README.md @@ -98,15 +98,7 @@ like so: wp s3-uploads verify ``` -You'll want to create a new IAM user for the S3-Uploads plugin, so you are not using admin level access keys on your site. S3-Uploads can create the IAM user for you and asign the correct permissions. - -``` -wp s3-uploads create-iam-user --admin-key= --admin-secret= -``` - -This will provide you with a new Access Key and Secret Key which you can configure S3-Uploads with. Paste the values in the `wp-config.php`. Once you have migrated your media to S3 with any of the below methods, you'll want to enable S3 Uploads: `wp s3-uploads enable`. - -If you want to create your IAM user yourself, or attach the necessary permissions to an existing user, you can output the policy via `wp s3-uploads generate-iam-policy` +You will need to create your IAM user yourself, or attach the necessary permissions to an existing user, you can output the policy via `wp s3-uploads generate-iam-policy` ## Listing files on S3 diff --git a/composer.json b/composer.json index 6fd8f928..ee085ff9 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ }, "type": "wordpress-plugin", "require": { - "composer/installers": "~1.0", + "composer/installers": "~1.0 || ^2.0", "aws/aws-sdk-php": "~3.18" }, "require-dev": { diff --git a/inc/class-image-editor-imagick.php b/inc/class-image-editor-imagick.php index 37900d95..9963fd08 100644 --- a/inc/class-image-editor-imagick.php +++ b/inc/class-image-editor-imagick.php @@ -106,8 +106,11 @@ protected function _save( $image, $filename = null, $mime_type = null ) { */ $parent_call = parent::_save( $image, $temp_filename ?: $filename, $mime_type ); - if ( is_wp_error( $parent_call ) && $temp_filename ) { - unlink( $temp_filename ); + if ( is_wp_error( $parent_call ) ) { + if ( $temp_filename ) { + unlink( $temp_filename ); + } + return $parent_call; } else { /** diff --git a/inc/class-wp-cli-command.php b/inc/class-wp-cli-command.php index 81962a68..1134bfc1 100644 --- a/inc/class-wp-cli-command.php +++ b/inc/class-wp-cli-command.php @@ -121,7 +121,7 @@ public function generate_iam_policy() { } /** - * List files in the S3 bukcet + * List files in the S3 bucket * * @synopsis [] * @@ -270,7 +270,7 @@ function() { } /** - * Ensable the auto-rewriting of media links to S3 + * Enable the auto-rewriting of media links to S3 */ public function enable() { update_option( 's3_uploads_enabled', 'enabled' ); diff --git a/s3-uploads.php b/s3-uploads.php index 289d9ab5..639e9c08 100644 --- a/s3-uploads.php +++ b/s3-uploads.php @@ -4,7 +4,7 @@ Plugin Name: S3 Uploads Description: Store uploads in S3 Author: Human Made Limited -Version: 3.0.0-beta +Version: 3.0.3 Author URI: https://hmn.md */