tencent cloud

Smart Media Hosting

Getting File Information

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-01-07 11:03:08

Introduction

This document provides an API overview and SDK example code for getting file information.
API
Operation Description
Get file download link and info

Getting File Information

Feature Overview

For getting file information.

Example Code

//target file name
val targetName = "targetName"
//target folder
val targetDir = Directory()

try {
val fileInfo: FileInfo = smh.getFileInfo(
name = targetName,
dir = targetDir,
//historical version number
historyId = 123456,
//purpose (used to mark the usage scenario of the link)
purpose = Purpose.PREVIEW
)
} catch (e: Exception) {
e.printStackTrace()
}


ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック