Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Delete] is missing and is a required parameter #90

Closed
neerajgoyal12 opened this issue Oct 20, 2015 · 2 comments
Closed

[Delete] is missing and is a required parameter #90

neerajgoyal12 opened this issue Oct 20, 2015 · 2 comments

Comments

@neerajgoyal12
Copy link

Getting error on delete, the said image is not deleted from the aws account either

@justinmccombs
Copy link

Also getting this same message.

InvalidArgumentException thrown with message "Found 1 error while validating the input provided for the DeleteObjects operation:
[Delete] is missing and is a required parameter"

Edit:
Updating Codesleeve\Stapler\Storage\S3 class resolved this issue:

/**
 * 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)
            ],
        ]);
    }
}

Edit 2:

I ended up changing the aws sdk to ~2.0 instead of ~3.0 in composer, and removed the changes above. If sdk v3.0 is needed, Codesleeve may need to check the version of the aws package and change syntax accordingly.

@tabennett
Copy link
Contributor

The current major release of Stapler currently only supports AWS sdk ~2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants