Skip to content

网页端批量上传时,路径包含'#'时'#'后的部分会消失 #2448

@hatsuyuki280

Description

@hatsuyuki280

Describe the bug

当通过网页端“上传目录”功能批量上传时,路径中若包含'#'字符,则路径中'#'字符后面的部分将会消失。
详情参考下面的截图

To Reproduce

Steps to reproduce the behavior:

  1. 在本地参考下面的目录结构创建测试用的目录及文件
test
├── #test
│   └── testc.txt
├── test#1
│   └── testa.txt
└── test#2
    └── testb.txt
  1. 打开Cloudreve网页前端
  2. 使用"上传目录"功能选择上述目录(test)
    Image
    Image
  3. 检查文件浏览器内展示的目录状态
    Image
    Image
    Image
  4. 如上述截图所示,上传后的目录结构变成了
test
├── .
│   └── testc.txt
└── test
    └── testa.txt
    └── testb.txt

Expected behavior

上传后的目录结构应保持原状

Screenshots

已添加

Desktop (please complete the following information):

  • OS:Windows 11 (24H2)
  • Browser:chrome/137.0.7151.68

Smartphone (please complete the following information):

  • 此问题在手机上也确认复现
  • OS:Android/16
  • Browser:chrome/137.0.7151.62

Additional context

当前cloudreve版本信息:

  • 4.0.0-beta.13#5ddc189
  • 未使用自定义前端
  • 已测试"新建文件夹"时,文件夹名称中可以包含'#'字符
  • 已测试通过"上传文件"功能选择文件名包含'#'字符的单一文件时,文件名正常
  • 已测试通过"上传目录"功能选择路径中不包含'#'字符,但子目录下的文件名中包含'#'字符的文件时,文件名正常

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions