Generate File Preview URL
# Description
Generate file preview URL
# Request Specification
Method: POST + application/json
Endpoint: https://${Cloud Domain}/cgi/crm/v2/generatorPreviewUrl?thirdTraceId=${Random String}
Headers: Refer to Common Parameters
# Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| data | Map | Yes | Data MAP |
| paths | List[String] | Yes | File paths |
| expire | Int | Yes | Expiration time |
| fileInfo | Map | Yes | Basic file information |
| path | String | Yes | File ID, must start with N_, TN_, C_, or TC_, max length 48 |
| filename | String | Yes | Filename, max 120 characters |
| extension | String | Yes | File extension (without dot). Supported preview types: png,webp,jpeg,jpg,bmp,gif,txt,sql,js,css,csv,json,md,xml,py,java |
| expireTime | Int | Yes | Link validity period in seconds. Min: 60, Max: 604800 |
| globalAcceleration | Boolean | No | Enable global acceleration, default false |
# Request Example
{
"data": {
"expireTime": "",
"globalAcceleration": "",
"fileInfo": {
"path": "",
"extension": "",
"filename": ""
}
}
}
# Response Parameters
| Parameter | Type | Description |
|---|---|---|
| traceId | string | Unique request ID |
| errorDescription | string | Error description |
| errorMessage | string | Error message |
| errorCode | Int | Error codes |
# Response Example
{
"traceId": "E-O.827xxxxxx",
"errorDescription": "success",
"errorMessage": "OK",
"errorCode": 0
}
# Notes
- Do not use the message field in the response for logical judgment as errorMessage may change;