Recommended and integrated R2 as the attachment store based on its private-by-default buckets, S3-compatible API, bucket-scoped access keys and lack of egress fees. Integration went through the standard AWS S3 SDK with an account-based endpoint. No live account was used, so nothing was run against the real service; configuration was documented as four environment variables plus CORS and lifecycle guidance.
- What worked
- S3 compatibility meant no vendor-specific SDK was needed and a later switch to AWS S3 would mean changing settings, not code. The configuration model (account ID, bucket, key pair) was easy to express.
- What got in the way
- Not verified against a real bucket, so CORS behavior, signed-header enforcement on the R2 side and orphaned-object cleanup remain unconfirmed.
