tencent cloud

Smart Media Hosting

Deleting a Single Folder

下载
聚焦模式
字号
最后更新时间: 2026-01-07 10:49:09
本文档由 AI 翻译

Introduction

This document provides an API overview about file renaming and SDK sample code.
API
Operation Description
Delete catalog or album

SDK API Reference

For specific parameters and method descriptions of all SDK APIs, please see SDK API Reference.

Delete Catalog or Album

Feature Description

Delete directory or album.

Sample Code

QCloudSMHDeleteObjectRequest *req = [QCloudSMHDeleteObjectRequest new];
// Media Library ID, required parameter
req.libraryId = @"libraryId";
// 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 parameter.
req.spaceId = @"spaceId";
NSMutableArray *batchInfos = [NSMutableArray array];
QCloudSMHBatchDeleteInfo *info = [QCloudSMHBatchDeleteInfo new];
// Deleted directory, album, or file path;
info.path = testDirName;
[batchInfos addObject:info];

req.batchInfos = [batchInfos copy];
[req setFinishBlock:^(QCloudSMHBatchResult *result, NSError *_Nullable error) {

}];
[[QCloudSMHService defaultSMHService]deleteObject:req];


帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈