amazon web services - AWS S3 .NET SDK: DeleteObjectsRequest return OK, but objects not deleted -


i have following code delete objects in s3 "folder":

deleteobjectsrequest req = new deleteobjectsrequest(); req.bucketname = "mybucket/my foder 1/my folder 2"; req.addkey("photo1.jpg", null); req.addkey("photo2.jpg", null); deleteobjectsresponse response = client.deleteobjects(req); 

response.httpstatuscode ok, , response.deletedobjects.count 2. however, actual objects still there. why?

this bucket had versioning turned on suspended before created folder deleted.

i worked out. should this:

deleteobjectsrequest req = new deleteobjectsrequest(); req.bucketname = "mybucket"; req.addkey("my foder 1/my folder 2/photo1.jpg", null); req.addkey("my foder 1/my folder 2/photo2.jpg", null); req.addkey("my foder 1/my folder 2/", null); deleteobjectsresponse response = client.deleteobjects(req); 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -