Cloudreve icon indicating copy to clipboard operation
Cloudreve copied to clipboard

Can't upload files with ":", "<", ">" in the filename

Open Yiannis128 opened this issue 1 month ago • 6 comments

Describe the bug

Unable to upload files with ":", "<", ">" in the name. I get no error message on the backend but the frontend displays the following error: Unable to create upload session: This file name or extension is not allowed.

Expected behavior

The file is uploaded.

Screenshots

Image

Desktop (please complete the following information):

  • OS: Linux Fedora 43
  • Browser: Librewolf (Firefox derivative)
  • Version: V4.10.1

Yiannis128 avatar Nov 28 '25 00:11 Yiannis128

As expected with error file name is not allowed.

Ref: https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names.

YUDONGLING avatar Dec 04 '25 08:12 YUDONGLING

As expected with error file name is not allowed.

Ref: https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names.

Hi, thank you for responding. I am running the server on Linux and my laptop is also Linux, so shouldn't this be allowed?

Yiannis128 avatar Dec 04 '25 16:12 Yiannis128

As expected with error file name is not allowed. Ref: https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names.

Hi, thank you for responding. I am running the server on Linux and my laptop is also Linux, so shouldn't this be allowed?

But Cloudreve is cross platform & I think this is not a common problem and you can try use customer frontend to replace those characters with '_' before upload for example.

YUDONGLING avatar Dec 04 '25 16:12 YUDONGLING

As expected with error file name is not allowed. Ref: https://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names.

Hi, thank you for responding. I am running the server on Linux and my laptop is also Linux, so shouldn't this be allowed?

But Cloudreve is cross platform & I think this is not a common problem and you can try use customer frontend to replace those characters with '_' before upload for example.

Wouldn't it be more cross-platform agnostic to apply the rules of the platform? Since Unix users have files with those characters due to them not having the restrictions. It would be a good idea to make the server use the rules of the OS rather than the most restricted version.

Yiannis128 avatar Dec 05 '25 00:12 Yiannis128

Considering users might mount Cloudreve at client side with different OS, so we choose the most restricted version instead of following the server side OS setting.

HFO4 avatar Dec 05 '25 07:12 HFO4

Considering users might mount Cloudreve at client side with different OS, so we choose the most restricted version instead of following the server side OS setting.

Hi, thank you for your response. It makes sense. Would it be possible to at least implement this as a toggle in admin settings "Allow native file name chats"? This way people running the service can choose if they want to allow it.

Yiannis128 avatar Dec 05 '25 18:12 Yiannis128