Skip to content

refactor(storage): remove deprecated URL from file projections - #2004

Open
Zetazzz wants to merge 4 commits into
mainfrom
fix/storage-public-file-url
Open

Zetazzz wants to merge 4 commits into
mainfrom
fix/storage-public-file-url

Conversation

@Zetazzz

@Zetazzz Zetazzz commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Remove the deprecated url field from FileProjection. Fresh and deduplicated uploads return the file ID, object key, bucket ID, MIME type, size, and optional filename. Callers can use the ID to query the file row’s downloadUrl once the upload is confirmed.

Update the GraphQL field description, storage schema snapshot, SDK descriptions, and plugin README to document this contract. Drop the pre-launch upgrade guidance.

All 101 plugin tests passed locally, including RustFS integration tests and regression coverage for public uploads with a configured public URL prefix. The package built for CommonJS and ESM, and ESLint passed on the changed plugin TypeScript files.

@luxor-code-review

luxor-code-review Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Review complete. 🟡 1 medium

💬 Inline comments (1)


This PR aligns the plugin's two public-URL surfaces on a single bucket-qualified layout and documents the CDN contract it implies. New projections and the public downloadUrl branch now share one helper, so file.url and downloadUrl address the same object consistently.

Files Change
src/public-file-url.ts New helper that normalizes the trailing slash on publicUrlPrefix and builds <prefix>/<bucket>/<key>
src/file-projection.ts, src/download-url-field.ts Both public-URL call sites switched to the shared helper, fixing the prior inconsistency where the projection omitted the bucket
src/types.ts Comment-only doc updates to the S3Config contract
__tests__/file-projection.test.ts, __tests__/s3-signer.integration.test.ts Tests updated for the bucket-qualified layout plus a new round-trip test asserting an anonymous public GET
README.md Documents the bucket/key layout and the CDN's role in serving public URLs

Reviewed commit: 00cd02a

@luxor-code-review luxor-code-review Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Unifies the public file-URL layout to <prefix>/<physical bucket>/<key> via a new buildPublicFileUrl helper used by both the upload projection and the computed downloadUrl.

Key findings

@Zetazzz Zetazzz changed the title fix(storage): include physical bucket in public file projections refactor(storage): remove deprecated URL from file projections Nov 19, 2026
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.

1 participant