tencent cloud

Smart Media Hosting

Product Introduction
Product Overview
Feature Description
Product Strengths
Use Cases
Basic Concept
Purchase Guide
Quick Start
Create Media Library
Initiate request
Service Level API Document
History
Introduction
API Category
Making API Requests
PaaS Service APIs
Official Cloud Disk APIs
Data Types
Error Codes
Business Level API Document
Introduction
Access Token Operation API
Tenant Space Operation API
File Operation API
Directory or Album Operation API
Recycle Bin Operation API
Quota Operation API
Query Task Operation API
Search Operation API
Historical Version Operations API
Directory and File Batch Operation API
Collection Operation API
Error Codes
SDK Documentation
Android SDK
iOS SDK
HarmonyOS SDK
FAQs
Enterprise Network Disk
Product Introduction
Purchase Guide
Quick Start
FAQs
Service Level Agreement
Glossary

Preview Recycle Bin Project

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2026-01-07 14:27:58

Description

Preview the project in the recycle bin.
Note:
It can be used to preview various file types such as documents, images, and videos;
When document files are previewed, it returns documents in HTML or JPG format for preview.
When video files are previewed, it returns the first frame of the video as the preview cover.
For photos or video covers, prioritize intelligent scaling and cropping to {Size}px × {Size}px using Face Recognition. If no face is detected, perform centered scaling and cropping to {Size}px × {Size}px. If the {Size} parameter is not specified, use the original photo or video cover. Finally, perform a 302 redirect to the corresponding image URL;
You can directly specify this URL in the parameters for image usage, such as in the Mini Program <image> tag, HTML <img> tag, or Mini Program wx.previewImage API, and so on. This API will automatically redirect (302) to the actual image URL;
If the file is not of a previewable type, it will redirect to the download link for the file;

Request

Request Example

GET /api/v1/recycled/{LibraryId}/{SpaceId}/{RecycledItemId}?preview&type={Type}&size={Size}&scale={Scale}&width_size={WidthSize}&height_size={HeightSize}&frame_number={FrameNumber}&access_token={AccessToken}

Request Parameter

Request parameters.
Description
Type
Required or Not
LibraryId
Media Library ID, obtained after creating a media library in the media hosting console. Please see Create Media Library
String
Yes
SpaceId
Space ID. If the media library is in single-tenant mode, this parameter is fixed as hyphen (`-`). If the media library is in multi-tenant mode, you must specify this parameter. See create tenant space
String
No
RecycledItemId
Recycle bin project ID. See list recycle bin projects
String
Yes
Type
The preview method for document files. If set to "pic", preview the document homepage in JPG format; otherwise, preview it in HTML format.
String
No
Size
Scaling of image or video cover size. Refer to API description for notes.
String
No
Scale
Proportional scaling percentage for image or video cover. This parameter is valid only when Size is not specified.
String
No
WidthSize
Scaling width of image or video cover. When height is not specified, it will be scaled proportionally. This parameter is valid only when Size and Scale are not specified.
String
No
HeightSize
Scaling height of image or video cover. When width is not specified, it will be scaled proportionally. This parameter is valid only when Size and Scale are not specified.
String
No
FrameNumber
Number of frames in a GIF file, frame processing targeting GIFs. This parameter is valid only when previewing GIF files.
String
No
AccessToken
Access token. For Public Read Media Library or tenant space, this parameter is not specified. Otherwise, you must specify this parameter. Please refer to Generate Access Token.
String
No

Request Body

This request does not have a request body.

Response

Response code

Acquisition successful, return HTTP 302 Found. The response header Location contains a URL that can be directly used to show or download the file.

Response Body

This response has no response body.

Error Codes

This request operation has no special error messages. For common error messages, see Error Codes.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan