How to stop / cancel loading in aws s3

While downloading files from amazon s3, I tried to undo / stop the file. But I cannot find a solution. So kindly suggest me a solution. Thanks to

S3GetObjectRequest *downloadRequest = [[[S3GetObjectRequest alloc] initWithKey:path withBucket:SECRET] autorelease];
    downloadRequest.delegate=self;
    [s3 getObject:downloadRequest];
    NSData *myData2;
        myData2 = response.body;
        [myData2 writeToFile:filePath atomically:YES];

      

This is the piece of code that is used to download.

+3


source to share


1 answer


S3GetObjectRequest has a urlConnection property . You can call cancel

in the property urlConnection

to cancel the download request.



+4


source







All Articles