Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
API | Operation Description |
Delete Files in Batches |
QCloudSMHBatchDeleteRequest *req = [QCloudSMHBatchDeleteRequest new];req.libraryId = @"libraryId";req.spaceId = @"spaceId";req.userId = @"userId";req.spaceOrgId = @"spaceOrgId";req.batchInfos = @[];[req setFinishBlock:^(QCloudSMHBatchResult *result, NSError * _Nullable error) {if it is a sync task, obtain the task status from the http status codeQCloudSMHBatchTaskStatus status = QCloudSMHBatchTaskStatusTypeFromStatus([result __originHTTPURLResponse__].statusCode);result.status = status;if(status != QCloudSMHBatchTaskStatusWating || error){// End when task status is not wait or there is an errorif(self.finishBlock){self.finishBlock(result, error);}}else{// Use the returned taskid to poll task statusself.taskId = result.taskId;}}];[[QCloudSMHService defaultSMHService]batchDelete:req];
QCloudGetTaskStatusRequest *req = [QCloudGetTaskStatusRequest new];req.spaceId = @"spaceId";req.spaceOrgId = @"spaceOrgId";req.libraryId = @"libraryId";req.userId = @"userId";// Back taskIdreq.taskIdList = @[taskId];[req setFinishBlock:^(NSArray * _Nonnull result, NSError * _Nonnull error) {}];[[QCloudSMHService defaultSMHService] getTaskStatus:req];
QCloudSMHDeleteObjectRequest *req = [QCloudSMHDeleteObjectRequest new];req.spaceId = @"spaceId";req.spaceOrgId = @"spaceOrgId";req.libraryId = @"libraryId";req.userId = @"userId";QCloudSMHBatchDeleteInfo *info = [QCloudSMHBatchDeleteInfo new];// file pathinfo.path = @"totalPath";req.batchInfos = @[info];[req setFinishBlock:^(QCloudSMHBatchResult *result, NSError *_Nullable error) {}];[[QCloudSMHService defaultSMHService] deleteObject:req];
피드백