liruizhe/dsh-file-download ↗★ 0

dsh-file-download

DSH Host 插件:新增 /api/dl 下载路由,按真实文件名给出 Content-Disposition(中文/空格均正常),补掉内置 /api/file 下载全叫 file.xxx 的短板。

包名
dsh-file-download
兼容性
待验证
Harness 依赖范围
>=0.2.0-rc.1
版本
0.1.0
许可证
MIT
最近更新
2026年11月10日

同名包的其他仓库

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:liruizhe/dsh-file-download

配置(可选)

默认就是 /api/dl + 20 MiB + attachment,无需配置。要改就在 profile 的 cordis.patch.yml 里按 id 写裸 row (本包自己的 cordis.patch.yml 已经 insert 过一次,不要再写 insert:,否则挂载两次):

- id: dsh-file-download
  config:
    route: /api/dl        # 必须在 /api/ 下
    maxBytes: 52428800    # 50 MiB
    mode: inline          # 默认内联预览,?download=1 才强制下载

改完重启 dsh 生效。GUI 里没有配置表单(故意为之:那需要依赖 @deepseek-ai/schemastery,会让插件不再是零依赖)。