fix(upload): content-api does not return signed urls#26034
Merged
markkaylor merged 3 commits intodevelopfrom Apr 17, 2026
Merged
fix(upload): content-api does not return signed urls#26034markkaylor merged 3 commits intodevelopfrom
markkaylor merged 3 commits intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
Detailed test plan on CMS-674 |
jhoward1994
approved these changes
Apr 16, 2026
pwizla
pushed a commit
to strapi/documentation
that referenced
this pull request
Apr 17, 2026
Adds documentation for signed URL behavior in the REST API upload endpoints when using AWS S3 with private ACL, addressing strapi/strapi#26034. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
pwizla
added a commit
to strapi/documentation
that referenced
this pull request
Apr 17, 2026
…ts (#3067) Adds documentation for signed URL behavior in the REST API upload endpoints when using AWS S3 with private ACL, addressing strapi/strapi#26034. Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
pwizla
added a commit
to strapi/documentation
that referenced
this pull request
Apr 17, 2026
…ts (#3067) Adds documentation for signed URL behavior in the REST API upload endpoints when using AWS S3 with private ACL, addressing strapi/strapi#26034. Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
pwizla
added a commit
to strapi/documentation
that referenced
this pull request
Apr 17, 2026
…ts (#3067) (#3069) Adds documentation for signed URL behavior in the REST API upload endpoints when using AWS S3 with private ACL, addressing strapi/strapi#26034. Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com> Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
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.
What does it do?
Adds
signFileUrls()calls to every method in the content-api upload controller (find,findOne,destroy,updateFileInfo,replaceFile,uploadFiles), signing file URLsbefore returning responses. This mirrors the existing pattern in the admin upload controller. Adds an API integration test covering all content-api upload endpoints for both private
and public providers.
Why is it needed?
When using S3 with
ACL: "private", the content-api upload endpoints (/api/upload,/api/upload/files, etc.) return unsigned URLs. These URLs are inaccessible (403) because thebucket is private. The admin controller already signs URLs before responding, but the content-api controller was missing this step entirely.
How to test it?
Configure a Strapi project with the AWS S3 provider (you can use minio) using
ACL: "private"(MinIO works as a local substitute). Upload a file viaPOST /api/uploadand verify the response URLcontains
X-Amz-Signaturequery parameters andisUrlSigned: true. Verify the same forGET /api/upload/filesandGET /api/upload/files/:id. Confirm that switching toACL: "public-read"returns plain unsigned URLs as before.Run the new API test:
yarn test:api tests/api/core/upload/content-api/upload-signing.test.api.jsRelated issue(s)/PR(s)