Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
I'm using the s3 adapter to attach files to a collection. When I use the REST API endpoints and don't supply a prefix, the configuration value is used. This is expected and working well.
This plugin is now being maintained in the Packages Directory of the Payload Monorepo. This repo will soon be archived and all open issues will be closed. This issue, however, will be transferred over.
I'm using the s3 adapter to attach files to a collection. When I use the REST API endpoints and don't supply a prefix, the configuration value is used. This is expected and working well.
When I try to create a new document from the admin panel, the prefix is ignored. Inspecting the request revealed that the admin panel is sending
"prefix": "."
in the payload along with the other fields. TheuploadHandler
picks up this value and uses it to override the configuration prefix: https://github.com/payloadcms/plugin-cloud-storage/blob/3d5858ca6d45d73c22e9bb97c2b443758d93400b/src/adapters/s3/handleUpload.ts#L27I checked the Payload configuration and it does seem to be setting the default value correctly:
so I wonder if this might be more of an issue with Payload CMS and not this plugin. If so, feel free to close this and I'll open up an issue there.