Skip to content

S3 storage adapter does not store full URL (anymore) when disablePayloadAccessControl is true #15382

Closed

Description

@jhb-dev

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

  1. Clone the reproduction repository and run the development server
  2. Configure your S3 credentials in the .env file
  3. Start the development server with pnpm dev
  4. Create a user account and log in to the admin panel at http://localhost:3000/admin
  5. Navigate to the Media collection and upload an image
  6. Check the database - the url field will contain /api/media/file/[filename] instead of the full S3 URL
  7. The same issue affects the sizes URLs (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

Activity

  1. added
    status: needs-triage
    validate-reproduction
    on Jan 27, 2026
  2. added
    area: core
    and removed
    validate-reproduction
    on Jan 27, 2026
  3. removed
    status: needs-triage
    on Jan 27, 2026
  4. added a commit that references this issue on Jan 28, 2026
    fdb9f29
  5. added
    plugin: cloud-storage
    and removed
    area: core
    on Jan 28, 2026
  6. added a commit that references this issue on Jan 28, 2026
    d269d39
  7. github-actions commented on Jan 30, 2026

    @github-actions
    Contributor

    🚀 This is included in version v3.74.0

  8. github-actions commented on Feb 7, 2026

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  9. locked as resolved and limited conversation to collaborators on Feb 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

created-by: Contributorplugin: cloud-storage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions