新增downloadFile接口,支持下载限定目录下任意文件 (#3073)

This commit is contained in:
夏楚
2023-12-02 15:58:40 +08:00
committed by GitHub
parent e1f199c986
commit 10c2197e76
4 changed files with 90 additions and 0 deletions

View File

@@ -2184,6 +2184,38 @@
}
},
"response": []
},
{
"name": "下载文件(downloadFile)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{ZLMediaKit_URL}}/index/api/downloadFile?file_path=/path/to/file.ext",
"host": [
"{{ZLMediaKit_URL}}"
],
"path": [
"index",
"api",
"downloadFile"
],
"query": [
{
"key": "file_path",
"value": "/path/to/file.ext",
"description": "文件绝对路径根据文件名生成Content-Type该接口将触发on_http_access hook"
},
{
"key": "save_name",
"value": "test",
"description": "浏览器下载文件后保存文件名;可选参数",
"disabled": true
}
]
}
},
"response": []
}
],
"event": [