Skip to content

fix(preview): preserve multibucket preview mapping - #67777

Open
MuhammadFaizan-prog wants to merge 1 commit into
nextcloud:masterfrom
MuhammadFaizan-prog:fix/67759-preview-bucket
Open

MuhammadFaizan-prog wants to merge 1 commit into
nextcloud:masterfrom
MuhammadFaizan-prog:fix/67759-preview-bucket

Conversation

@MuhammadFaizan-prog

@MuhammadFaizan-prog MuhammadFaizan-prog commented Dec 6, 2026 •

Copy link
Copy Markdown

Summary

Fixes the bucket calculation used when migrating previews on multibucket object storage. The migration used the first character of the file ID’s hash twice instead of using the first two characters. This could record the wrong bucket and make an existing preview unreadable after an upgrade. The fix corrects the mapping for future migrations; it does not rewrite existing mappings or move objects.

TODO

  • Record the contributor’s live-instance test and observed result.

Checklist

  • git diff --check passed.
  • The commit includes a Signed-off-by trailer.
  • Unit tests are included. Two S3 regression cases failed before the fix and passed afterward. All 7 focused checks passed: 4 unit tests and 3 S3 HTTP tests.
  • Screenshots before/after for front-end changes (not applicable; backend only).
  • Documentation is not required; no user-facing setting or API changed.
  • Backports requested where applicable (none requested).
  • Labels added where applicable.
  • Milestone added for the target branch/version.

Signed-off-by: Muhammad Faizan <muhammadfaizanali18@gmail.com>
Assisted-by: ChatGPT:gpt
@MuhammadFaizan-prog
MuhammadFaizan-prog requested a review from a team as a code owner December 6, 2026 15:37
@MuhammadFaizan-prog
MuhammadFaizan-prog requested review from Altahrim and salmart-dev and removed request for a team December 6, 2026 15:37

This branch has not been deployed

No deployments
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.

Multibucket preview distribution: previews are migrated to the wrong bucket

1 participant