Request

GET /api/get_small_file

Description

通过文件 id,下载在文件管理器中的文件。

Path parameters

Query parameters

  • token

    集群的 token。可以在 doris-meta/image/VERSION 文件中查看。

  • file_id

    文件管理器中显示的文件 id。文件 id 可以通过 SHOW FILE 命令查看。

Request body

Response

  1. < HTTP/1.1 200
  2. < Vary: Origin
  3. < Vary: Access-Control-Request-Method
  4. < Vary: Access-Control-Request-Headers
  5. < Content-Disposition: attachment;fileName=ca.pem
  6. < Content-Type: application/json;charset=UTF-8
  7. < Transfer-Encoding: chunked
  8. ... File Content ...

如有错误,则返回:

  1. {
  2. "msg": "File not found or is not content",
  3. "code": 1,
  4. "data": null,
  5. "count": 0
  6. }

Examples

  1. 下载指定 id 的文件

    1. GET /api/get_small_file?token=98e8c0a6-3a41-48b8-a72b-0432e42a7fe5&file_id=11002
    2. Response:
    3. < HTTP/1.1 200
    4. < Vary: Origin
    5. < Vary: Access-Control-Request-Method
    6. < Vary: Access-Control-Request-Headers
    7. < Content-Disposition: attachment;fileName=ca.pem
    8. < Content-Type: application/json;charset=UTF-8
    9. < Transfer-Encoding: chunked
    10. ... File Content ...