diff --git a/composer.json b/composer.json index 5c696ef..544bacc 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "codesleeve/stapler", + "name": "a7madev/stapler", "description": "Elegant and simple ORM-based file upload package for php.", "keywords": ["ORM", "file", "upload", "S3", "AWS", "paperclip"], "license": "MIT", diff --git a/src/Storage/S3.php b/src/Storage/S3.php index fb97026..8177d55 100644 --- a/src/Storage/S3.php +++ b/src/Storage/S3.php @@ -65,17 +65,22 @@ public function path($styleName) return $this->attachedFile->getInterpolator()->interpolate($this->attachedFile->path, $this->attachedFile, $styleName); } - /** - * Remove an attached file. - * - * @param array $filePaths - */ - public function remove(array $filePaths) - { - if ($filePaths) { - $this->s3Client->deleteObjects(['Bucket' => $this->attachedFile->s3_object_config['Bucket'], 'Objects' => $this->getKeys($filePaths)]); - } +/** + * Remove an attached file. + * + * @param array $filePaths + */ +public function remove(array $filePaths) +{ + if ($filePaths) { + $this->s3Client->deleteObjects([ + 'Bucket' => $this->attachedFile->s3_object_config['Bucket'], + 'Delete' => [ + 'Objects' => $this->getKeys($filePaths) + ], + ]); } +} /** * Move an uploaded file to it's intended destination.