fix(plugin-cloud-storage): preserve user-defined prefix.defaultValue#16523
Merged
Conversation
AlessioGr
commented
May 6, 2026
| * should sanitize the filename (e.g. `duplicate-target-1.png`) so the | ||
| * browser PUT lands on a fresh blob instead of overwriting the existing one. | ||
| */ | ||
| it('sanitizes the filename when a duplicate already exists', async () => { |
Member
Author
There was a problem hiding this comment.
Just moved this test from the non-client-uploads int.spec.ts. Not a new test
Contributor
📦 esbuild Bundle Analysis for payloadThis analysis was generated by esbuild-bundle-analyzer. 🤖 |
AlessioGr
commented
May 6, 2026
| await payload.delete({ collection: mediaSlug, id: seedDoc.id }) | ||
| }) | ||
|
|
||
| it('preserves a user-defined prefix.defaultValue across the plugin', async () => { |
paulpopus
previously approved these changes
May 6, 2026
paulpopus
approved these changes
May 7, 2026
AlessioGr
added a commit
that referenced
this pull request
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If you defined your own
defaultValueon theprefixfield of an upload collection (e.g.() => crypto.randomUUID()for a per-document folder), the cloud-storage plugin silently overwrote it.The fix is a one-line change: only fall back to the plugin's default when no user-defined
defaultValueis present.