zpan icon indicating copy to clipboard operation
zpan copied to clipboard

Can Cloudflare R2 be supported ?

Open Lua12138 opened this issue 1 year ago • 0 comments

R2 supports a subset of the S3 API, with a specific list of API compatibility: https://developers.cloudflare.com/r2/api/s3/api/

Now after adding the R2 storage bucket and uploading a file, it sends a request like this:

PUT /OBJECT_KEY?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=8138db3fb539d4af367888cf0518af0f%2F20231229%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231229T021523Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=content-type%3Bhost%3Bx-amz-acl&X-Amz-Signature=a801f2b2fd37860f1ac01b6e49df3c0ec33d5c672bae20d319d8c75767926090
HOST: BUCKET_NAME.R2_ACCOUNT_ID.r2.cloudflarestorage.com
...Something else headers

And the R2 returns http code 501 with no http content.

Lua12138 avatar Dec 29 '23 02:12 Lua12138