Description
📜 Description
When using Postiz with STORAGE_PROVIDER=cloudflare, file uploads via the “Insert Media” modal are broken. The app attempts to perform a multipart upload via Uppy, but fails with a 500 error when calling:
/api/media/create-multipart-upload
/api/media/sign-part
/api/media/abort-multipart-upload
The error seems to be caused by a missing UploadId, which results in Uppy trying to upload to an undefined URL. This completely breaks the upload flow.
👟 Reproduction steps
Deploy Postiz using Docker with Cloudflare R2 configured as per docs
- Open the “Create Post” UI
- Click on Insert Media
- Select or drag a file to upload
- Observe multiple 500 errors and console exceptions
👍 Expected behavior
It should initiate a multipart upload, return a valid UploadId, and complete the file upload to Cloudflare R2. The uploaded file should appear in the media library.
👎 Actual Behavior with Screenshots
It actually:
Returns 500 Internal Server Error from all three endpoints
Logs: TypeError: Expected a non-null value for UploadId
Logs: [Uppy] Cannot upload to an undefined URL
Console stack trace from the Uppy plugin confirms that no upload URL is returned.
💻 Operating system
Linux
🤖 Node Version
docker image official
📃 Provide any additional context for the Bug.
Cloudflare R2 bucket, access key, and secret are correctly set and tested
TLS is enabled (https used on all requests)
Issue likely caused by createMultipartUpload() returning an invalid or empty response, causing UploadId to be undefined
This cascades into Uppy trying to upload to a broken URL
Please let me know if you need sanitized logs or env config. Happy to test patches/fixes as well.
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn't find similar issue
Are you willing to submit PR?
None