Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Can't delete multiple objects with aws-sdk-rails #212

Open
bjoerne2 opened this issue Aug 20, 2017 · 1 comment
Open

Can't delete multiple objects with aws-sdk-rails #212

bjoerne2 opened this issue Aug 20, 2017 · 1 comment

Comments

@bjoerne2
Copy link
Contributor

Hi!

I'd like to delete multiple objects and tried the newest master version with the latest commit DeleteObjects (#154) dcbe393 which supports deletion of multiple objects.

But unfortunately it doesn't work.

I'm accessing Fakes3 with the official library aws-sdk-rails. In my code it looks like this:

client.delete_objects({
  bucket: some_bucket
  delete: {
    objects: hash_with_keys
  }
})

This leads to a POST request with the URL /?delete. The data is in the request body.

In Fakes3 this causes an exception:

ERROR FakeS3::UnsupportedOperation: FakeS3::UnsupportedOperation
/Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/fake-s3-dcbe393b1365/lib/fakes3/server.rb:369:in normalize_delete' /Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/fake-s3-dcbe393b1365/lib/fakes3/server.rb:499:in normalize_request'
/Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/fake-s3-dcbe393b1365/lib/fakes3/server.rb:326:in do_DELETE' /Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/bundler/gems/fake-s3-dcbe393b1365/lib/fakes3/server.rb:247:in do_POST'
/Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpservlet/abstract.rb:107:in service' /Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:140:in service'
/Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/httpserver.rb:96:in run' /Users/bjoerne/.rbenv/versions/2.3.1/lib/ruby/2.3.0/webrick/server.rb:296:in block in start_thread'

Is this kind of deletion not supported?

@bjoerne2
Copy link
Contributor Author

I opened a pull request: #213

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

No branches or pull requests

1 participant