文件-类型

接口信息

  • 接口地址: {your-site-url}/api/skill/base-download/get-file-types
  • 基础 URL: {your-site-url} 需替换为你自己的独立站 URL 地址,如 https://your-domain.com/apimanager666
  • 请求方式: GET
  • 说明: 得到文件类型列表。返回的文件类型 type_code,用于 下载文件-列表 接口的 type 参数过滤文件类型。

认证

请求头中需要携带 skill-access-token

Header
skill-access-token {your-skill-access-token} (请替换为你自己的 token)

请求参数

无请求参数。

请求示例

cURL

curl --location --request GET '{your-site-url}/api/skill/base-download/get-file-types' \
--header 'skill-access-token: {your-skill-access-token}' \
--header 'Content-Type: application/json'

返回结果

code200 表示调用成功;code 不为 200 表示调用失败。

成功响应

{
    "code": 200,
    "data": [
        {
            "type_code": "1",
            "text": "文件类型-图片",
            "code": "image"
        },
        {
            "type_code": "2",
            "text": "文件类型-音频",
            "code": "audio"
        },
        {
            "type_code": "3",
            "text": "文件类型-视频",
            "code": "video"
        },
        {
            "type_code": "4",
            "text": "文件类型-excel",
            "code": "excel"
        },
        {
            "type_code": "5",
            "text": "文件类型-ico",
            "code": "ico"
        },
        {
            "type_code": "6",
            "text": "文件类型-pdf",
            "code": "pdf"
        },
        {
            "type_code": "7",
            "text": "文件类型-doc",
            "code": "doc"
        },
        {
            "type_code": "8",
            "text": "文件类型-zip",
            "code": "zip"
        },
        {
            "type_code": "9",
            "text": "文件类型-csv",
            "code": "csv"
        }
    ],
    "message": "success"
}

返回字段说明

字段 类型 说明
code Number 状态码,200 表示成功
message String 执行结果的文字描述
data Array 文件类型列表
data[].type_code String 文件类型编码,用于 下载文件-列表 接口的 type 参数
data[].text String 文件类型的文字描述,如:文件类型-图片
data[].code String 文件类型的代码,如:imageaudio

注意事项

  1. 返回的文件类型 type_code下载文件-列表 返回的 data.list[].type 字段对应。
  2. 文件类型汇总:1 图片(image)、2 音频(audio)、3 视频(video)、4 excel、5 ico、6 pdf、7 doc、8 zip、9 csv。
Copyright © fecify.com 2025 all right reserved,powered by Gitbook该文件修订时间: 2026-08-06 15:52:16

results matching ""

    No results matching ""