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()
}


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백