This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
plugin-cloud-storage: Update S3 URL generation #4832
Labels
plugin: cloud-storage
@payloadcms/plugin-cloud-storage
Currently, the plugin generates URLs like that:
Notice how the bucket is specified as part of the path. S3 also supports specifying the bucket as part of the origin, like that:
I think the latter is preferred, because all URLs in the Amazon console look like that. Also, this answer on Server Fault states that Amazon my sometimes redirect from the old deprecated form (that Payload uses) to the new one.
I think this should be changed:
https://github.com/payloadcms/plugin-cloud-storage/blob/e11a0fb28534b7d9fd0e91b51e7ab4df6cad664c/src/adapters/s3/generateURL.ts#L10-L14
If the new URL scheme is used, I think the
bucket
option can be dropped, because theendpoint
will contain the bucket name already.The text was updated successfully, but these errors were encountered: