Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
QCloudCOSSMHUploadObjectRequest *uploadReq = [QCloudCOSSMHUploadObjectRequest new];// If confirmKey is set, deem as resume upload; otherwise, it's a new upload task.// Get from the getConfirmKey callback.uploadReq.confirmKey = @"confirmKey";// Set the libraryId where the directory to be uploaded is located.uploadReq.libraryId = @"libraryId";// Set the libraryId where the directory to be uploaded is located.uploadReq.spaceId = @"spaceId";// URL or data of the uploaded fileuploadReq.body = @"uploadBody";uploadReq.uploadPath = @"target path";// confirmKey callbackuploadReq.getConfirmKey = ^(NSString *_Nullable confirmKey) {// confirmKey is required for resuming uploads, business needs to save};// upload progress callback[uploadReq setSendProcessBlock:^(int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend) {}];// upload result callback[uploadReq setFinishBlock:^(QCloudSMHContentInfo *result, NSError *error) {}];// Start uploading[[QCloudSMHService defaultSMHService] uploadObject:uploadReq];
[uploadReq cancel];
[uploadReq abort:^(id outputObject, NSError *error) {// end callback}];
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback