You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Latin: 1 character = 1 byte. Cyrillic: 1 character = 2 bytes. Arabic: 1 character = 2-3 bytes. Chinese: 1 character = 3 bytes. Emodj: 1 character = 4 bytes.
63 characters will be guaranteed to work.
Nice analysis, thank you! What do you think about space names then, should we limit those to 63 characters as well? Those are currently limited to 255 characters.
I understand that there is currently a server-side limitation of 256 bytes, but shouldn't the web client then try to limit filenames to 256 bytes? Since the update I constantly run into the issue that filenames during a rename are too long although I'm mostly using 1-byte characters. A limit of 63 characters is extremely restrictive for languages with 1-2 bytes per character.
The actual byte length of a string could AFAIK be calculated using the TextEncoder API.
@kulmann can we create a user story out of this for the upcoming sprint ? This can be implemented with ease since you centralized the resource name validation some weeks ago.
The only issue I see with this approach is, that we can't expose a detailed error message e.G only x characters allowed, instead we are only able to tell the user that the file name is too long.
(As the common user isn't thinking in bytes)
That sounds great and @AlexAndBear many thanks for the quick reaction!
From a user's perspective, I personally wouldn't mind much that an error message doesn't tell the explicit character limit:
If I type a resource name and then at some point the error shows up, I have a pretty good idea when I reached the length limit. Only pasting a name could lead to carefully editing until the error message vanishes.
And as currently, that a filename is being edited and is immediately over limit (where you wonder why, as the file exists with the long name): this wouldn't happen anymore as (I assume) uploads with filenames above the 256 bytes limit wouldn't be accepted in the first place.
It may be useful though for more advanced users who understand the difference between characters and bytes to add a tooltip to the error message (if that is feasible to implement) or link a documentation page that gives some technical insight into the limitation and mentions the 256 bytes limit.
Another idea may be to tell the user roughly (due to the varying sequence lengths) how many characters they are over the limit, counting from the first character whose byte sequence didn't fit into the first 256 bytes block anymore.
@takerukoushirou fyi, this fix will be included in the next rolling release of OpenCloud, which is expected to be early next week (most likely on 23rd or 24th of September).
Activity
kulmann commentedon May 30, 2025
Do you know how many characters are allowed?
v-scharf commentedon May 30, 2025
server has problems sending more than 256 bytes.
Latin: 1 character = 1 byte.
Cyrillic: 1 character = 2 bytes.
Arabic: 1 character = 2-3 bytes.
Chinese: 1 character = 3 bytes.
Emodj: 1 character = 4 bytes.
63 characters will be guaranteed to work.
kulmann commentedon Jun 2, 2025
Nice analysis, thank you! What do you think about space names then, should we limit those to 63 characters as well? Those are currently limited to 255 characters.
v-scharf commentedon Jun 2, 2025
yeah, good point. we should take care also about the space names
takerukoushirou commentedon Sep 13, 2025
I understand that there is currently a server-side limitation of 256 bytes, but shouldn't the web client then try to limit filenames to 256 bytes? Since the update I constantly run into the issue that filenames during a rename are too long although I'm mostly using 1-byte characters. A limit of 63 characters is extremely restrictive for languages with 1-2 bytes per character.
The actual byte length of a string could AFAIK be calculated using the
TextEncoderAPI.AlexAndBear commentedon Sep 13, 2025
@takerukoushirou good point!
@kulmann can we create a user story out of this for the upcoming sprint ? This can be implemented with ease since you centralized the resource name validation some weeks ago.
The only issue I see with this approach is, that we can't expose a detailed error message e.G only x characters allowed, instead we are only able to tell the user that the file name is too long.
(As the common user isn't thinking in bytes)
takerukoushirou commentedon Sep 13, 2025
That sounds great and @AlexAndBear many thanks for the quick reaction!
From a user's perspective, I personally wouldn't mind much that an error message doesn't tell the explicit character limit:
If I type a resource name and then at some point the error shows up, I have a pretty good idea when I reached the length limit. Only pasting a name could lead to carefully editing until the error message vanishes.
And as currently, that a filename is being edited and is immediately over limit (where you wonder why, as the file exists with the long name): this wouldn't happen anymore as (I assume) uploads with filenames above the 256 bytes limit wouldn't be accepted in the first place.
It may be useful though for more advanced users who understand the difference between characters and bytes to add a tooltip to the error message (if that is feasible to implement) or link a documentation page that gives some technical insight into the limitation and mentions the 256 bytes limit.
Another idea may be to tell the user roughly (due to the varying sequence lengths) how many characters they are over the limit, counting from the first character whose byte sequence didn't fit into the first 256 bytes block anymore.
AlexAndBear commentedon Sep 15, 2025
@takerukoushirou TYSM, see the related PR #1187
takerukoushirou commentedon Sep 16, 2025
@AlexAndBear awesome, and thank you very much for the super fast implementation!
kulmann commentedon Sep 16, 2025
@takerukoushirou fyi, this fix will be included in the next rolling release of OpenCloud, which is expected to be early next week (most likely on 23rd or 24th of September).