Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
API | Operation Description |
Move or Rename File |
QCloudSMHRenameFileRequest *req = [QCloudSMHRenameFileRequest new];// Space ID; if the media library is in single-tenant mode, this parameter is fixed as a hyphen (-); if the media library is in multi-tenant mode, you must specify this parameterreq.spaceId = @"spaceId";// Media Library ID, required parameterreq.libraryId = @"libraryId";// Target file namereq.from = @"targetname";// Complete file pathreq.filePath = @"filePath";/// Handling method when filename conflict occurs, default is rename/// ask: Returns HTTP 409 Conflict and error code SameNameDirectoryOrFileExists when conflicts with/// rename: Automatically rename the file when conflicts with/// overwrite: Returns HTTP 409 Conflict and error code SameNameDirectoryOrFileExists when the target is a directory, otherwise overwrites the existing file;req.conflictStrategy = QCloudSMHConflictStrategyEnumOverWrite;[req setFinishBlock:^(QCloudSMHRenameResult *result, NSError *_Nullable error) {}];[[QCloudSMHService defaultSMHService] renameFile:req];
フィードバック