Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Mar 14, 2025

Summary

A filename must be less or equal 255 characters, but when adding the
.part and .ocfiletransfer extensions we might overflow this limit.
So we should also use filename hashes for uploading when the file has a
long filename, similar like when we are uploading to the user storage directly.

TODO

  • discuss if it makes sense to align oc_filecache.name. Meaning to increase it from 250 to 255. cc @icewind1991

Tests

Before

Bildschirmfoto_20250315_135643

After

Bildschirmfoto_20250315_135602

Checklist

@susnux susnux added this to the Nextcloud 32 milestone Mar 14, 2025
@susnux susnux marked this pull request as ready for review March 15, 2025 14:13
@susnux susnux requested a review from a team as a code owner March 15, 2025 14:13
@susnux susnux requested review from icewind1991, provokateurin, skjnldsv and sorbaugh and removed request for a team and sorbaugh March 15, 2025 14:13
@susnux susnux added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Mar 15, 2025
Copy link
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one idea to make it even better.

@susnux susnux requested review from a team and provokateurin April 18, 2025 22:44
susnux added 2 commits April 22, 2025 11:09
Reduce nesting and drop duplicated sections.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
A filename must be less or equal 255 characters, but when adding the
`.part` and `.ocfiletransfer` extensions we might overflow this limit.
So we should also use filename hashes for uploading when the file has a
long filename, similar like when we are uploading to the user storage
directly.

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
@susnux
Copy link
Contributor Author

susnux commented Apr 22, 2025

rebased to squash fixup commits.

@susnux susnux merged commit efa2cda into master Apr 22, 2025
200 of 215 checks passed
@susnux susnux deleted the fix/path-length branch April 22, 2025 11:53
@susnux
Copy link
Contributor Author

susnux commented Apr 22, 2025

/backport to stable31

@susnux
Copy link
Contributor Author

susnux commented Apr 23, 2025

/backport to stable30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support correctly long path or filename failed to open stream: File name too long

5 participants