-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
created-by: Contributorplugin: cloud-storage@payloadcms/plugin-cloud-storage@payloadcms/plugin-cloud-storage
Description
Describe the Bug
Since PR #15089, which was released in v3.71.0, when using the @payloadcms/storage-s3 adapter with disablePayloadAccessControl: true, the full S3 URL is no longer stored in the database.
Expected behavior (before v3.71.0):
When disablePayloadAccessControl: true is set, the full S3 URL should be stored in the database, e.g.:
https://your-bucket.s3.us-east-1.amazonaws.com/media/image.jpg
Actual behavior (since v3.71.0):
Only the relative Payload API URL is stored in the database, e.g.:
/api/media/file/image.jpg
This is a regression because the purpose of disablePayloadAccessControl: true is to bypass Payload's access control and serve files directly from S3. Storing the relative URL defeats this purpose and requires additional logic to construct the full S3 URL.
Link to the code that reproduces this issue
https://github.com/jhb-dev/payload-s3-url-regression
Reproduction Steps
- Clone the reproduction repository and run the development server
- Configure your S3 credentials in the
.envfile - Start the development server with
pnpm dev - Create a user account and log in to the admin panel at http://localhost:3000/admin
- Navigate to the Media collection and upload an image
- Check the database - the
urlfield will contain/api/media/file/[filename]instead of the full S3 URL - The same issue affects the
sizesURLs (thumbnail, card, etc.)
Which area(s) are affected?
area: core
Environment Info
Binaries:
Node: 24.3.0
npm: 11.4.2
Yarn: 1.22.22
pnpm: 10.28.1
Relevant Packages:
payload: 3.73.0
next: 15.4.11
@payloadcms/db-mongodb: 3.73.0
@payloadcms/graphql: 3.73.0
@payloadcms/next/utilities: 3.73.0
@payloadcms/plugin-cloud-storage: 3.73.0
@payloadcms/richtext-lexical: 3.73.0
@payloadcms/storage-s3: 3.73.0
@payloadcms/translations: 3.73.0
@payloadcms/ui/shared: 3.73.0
react: 19.2.1
react-dom: 19.2.1
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 24.6.0
Available memory (MB): 24576
Available CPU cores: 14
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
created-by: Contributorplugin: cloud-storage@payloadcms/plugin-cloud-storage@payloadcms/plugin-cloud-storage