Download File
GET
/web/v1/files/query/{fileBizId}/downloadJWT + TurnstileDownloads a file directly as a streamed binary response. The response includes appropriate Content-Disposition, Content-Type, and Content-Length headers.
Authentication
Auth Chain: WEB Chain — requires
Authorization: Bearer <jwt>and Turnstile token. These headers are injected by the system (frontend does nothing):X-PORTAL-ACCESS-CODE(Nginx),X-Request-Id(Gateway)
Request Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
fileBizId | string | Yes | path | File business ID |
Success Response
The response is a binary file stream with the following headers:
| Header | Example Value |
|---|---|
Content-Disposition | attachment; filename="invoice.pdf" |
Content-Type | application/pdf |
Content-Length | 102400 |
Error Responses
Unauthorized401
{
"success": false,
"code": "4010",
"message": "Invalid or expired token"
}Not Found404
{
"success": false,
"code": "4040",
"message": "File not found"
}Notes
- The response body is a raw binary stream, not a JSON envelope.
- For large files, consider using Get Download URL instead to offload the download to object storage directly.
- The original filename is preserved in the
Content-Dispositionheader.