Skip to content

fix: improve media download delivery#27

Closed
papayachat wants to merge 1 commit intoqingchencloud:mainfrom
papayachat:feat/media-delivery-fixes
Closed

fix: improve media download delivery#27
papayachat wants to merge 1 commit intoqingchencloud:mainfrom
papayachat:feat/media-delivery-fixes

Conversation

@papayachat
Copy link

This PR fixes ClawApp's MEDIA:/absolute/path download flow.

Changes:

  • add MEDIA_ALLOWED_DIRS support for /media
  • make file cards open in download mode
  • preserve downloaded filename and extension
  • fix UTF-8 filename handling in Content-Disposition
  • fix MEDIA: path parsing for filenames containing spaces

Validated with node --check server/index.js and npm run build:h5.

@1186258278
Copy link
Contributor

感谢贡献!PR 中的改进已手动合并到 main 分支(v1.9.0),包括:路径安全加固(symlink resolution + MEDIA_ALLOWED_DIRS)、Content-Disposition 下载支持(UTF-8 文件名)、MEDIA: 路径支持含空格文件名、文件卡片下载模式。关闭此 PR。

@1186258278 1186258278 closed this Mar 24, 2026
1186258278 added a commit that referenced this pull request Mar 24, 2026
… copy fix

Changes:
- fix: website copy button now copies the active tab's command (#24)
- fix: mobile image upload base64 compatibility for Android browsers (#21)
- feat: improve media download delivery (from PR #27 by @papayachat)
  - path security hardening with symlink resolution
  - MEDIA_ALLOWED_DIRS config for custom allowed directories
  - Content-Disposition download mode with UTF-8 filename support
  - MEDIA: path parsing supports filenames with spaces
  - file cards open in download mode
- chore: bump version to v1.9.0
- chore: close resolved issues #7 #8 #19 #22 #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants