OVHcloud S3 uploads broken
Bug Description
File uploads no longer work with OVHcloud S3-compatible Object Storage since Twenty 2.39.
Uploads worked with Twenty <= 2.38. Starting with 2.39, completing an upload fails during CompleteFileUpload.
Twenty now promotes an uploaded file using S3 CopyObject with CopySourceIfMatch, which results in the X-Amz-Copy-Source-If-Match request header.
OVHcloud rejects this operation with:
501 NotImplemented
Copy object not implemented with X-Amz-Copy-Source-If-MatchThe corresponding Twenty server error is:
NotImplemented: Copy object not implemented with X-Amz-Copy-Source-If-Match
operation: { name: 'CompleteFileUpload', type: 'mutation' }
httpStatusCode: 501
Code: 'NotImplemented'This makes file uploads unusable for installations using OVHcloud S3.
This appears to be a regression introduced by #25342, which changed the upload flow to quarantine uploads and promote them using a conditional CopyObject.
The PR description itself mentions that MinIO and Cloudflare R2 implement this header, while other S3-compatible backends were unverified, and that a backend rejecting the header would cause completion to fail.
That is exactly what happens with OVHcloud.
Expected behavior
A previously working S3-compatible storage backend should continue to work after upgrading Twenty.
Twenty should either:
- support S3-compatible providers that do not implement
CopySourceIfMatch, or - provide a configurable fallback for providers without this capability.
Making the conditional promotion mechanism optional could be one solution, provided the security/integrity implications are made explicit.
A minor-version upgrade should also not silently introduce a new mandatory storage-provider capability that breaks previously supported deployments.
Technical inputs
Environment:
Twenty: 2.40.2
Deployment: self-hosted / Docker Compose
Storage: OVHcloud S3-compatible Object StorageRegression boundary:
Twenty <= 2.38: uploads work
Twenty >= 2.39: upload completion failsThe new flow introduced in #25342 is approximately:
upload to pending/quarantine path
-> validate object
-> CopyObject to final path
-> CopySourceIfMatch = uploaded object's ETag
-> delete pending objectThe S3 driver sends:
CopySourceIfMatchwhich AWS maps to:
X-Amz-Copy-Source-If-MatchOVHcloud returns HTTP 501 for this operation.
This is a backward-incompatible behavior change introduced on a minor version and breaks an existing production deployment.
Source: twentyhq/twenty