tencent cloud

Smart Media Hosting

Deleting a Single File

Download
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-07 11:03:08
Diterjemahkan oleh AI

Introduction

This document provides an API overview about file renaming and SDK sample code.
API
Operation Description
Deletes files.

Deletes files.

Feature Overview

Deletes files.

Example Code

try {
val deleteMediaResult: DeleteMediaResult? = smh.delete(
Filename
name = "uploadBigMedia.jpg",
Folder location, root directory is selected by default
dir = Directory(),
//Whether to permanently delete. If true, the data will not be placed in the recycle bin.
permanent = false
)
//Recycle bin item ID. If the recycle bin is not enabled or permanent is true, it will be empty.
val recycledItemId = deleteMediaResult?.recycledItemId
} catch (e: Exception) {
e.printStackTrace()
}


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan