galhe2 February 2016

AWS s3 - Delete multiple objects in iOS

I am trying to delete multiple objects in Amazon Cloud Service in Objective-C.

After searching the internet, all I could find is how to Delete only ONE object:

    AWSS3 *s3 = [AWSS3 defaultS3];
    AWSS3DeleteObjectRequest *deleteRequest = [AWSS3DeleteObjectRequest new];
    deleteRequest.bucket = yourBucket;
    deleteRequest.key = yourKey;
    [[s3 deleteObject:deleteRequest] continueWithBlock:^id(AWSTask *task) {
        return task;
    }];

However, i want to be able to delete multiple objects from a bucket in one request. Please help!!

Thank you so much

Answers


Chris Franklin February 2016

There is another call called AWSS3DeleteObjectsRequest (plural) that allows you to delete multiple objects if you know all of the keys. Check out the documentation here.

Post Status

Asked in February 2016
Viewed 1,491 times
Voted 6
Answered 1 times

Search




Leave an answer