Errors with Seafile PE and Cloudflare R2 storage

Hey all, I am currently experimenting with connecting Seafile PE to Cloudflare’s new S3 compatible storage service R2, see Everything was easy to set up via docker, but Seafile is unable to write to R2 buckets, se error message from seafile.log below:

2023-10-16 10:25:51 ../common/s3-client.c(949): S3 error status for HEAD: 400.
2023-10-16 10:25:51 ../common/s3-client.c(725): S3 error status for PUT: 400.
2023-10-16 10:25:51 ../common/s3-client.c(726): Request URL:
2023-10-16 10:25:51 ../common/s3-client.c(727): Request headers:
2023-10-16 10:25:51 ../common/s3-client.c(624): Date: Mon, 16 Oct 2023 10:25:51 +0000
2023-10-16 10:25:51 ../common/s3-client.c(624): Authorization: AWS4-HMAC-SHA256 Credential=zzz/20231016/auto/s3/aws4_request,SignedHeaders=host;x-amz-content-sha256,Signature=zzz
2023-10-16 10:25:51 ../common/s3-client.c(624): x-amz-content-sha256: f3f9b62407881ed11c004b4083c1df5ed4167bdd2c791a3f0923ca7dd179b891
2023-10-16 10:25:51 ../common/obj-backend-s3.c(348): Put object 2e59c01c240cc087514acb013e5a787bd7607b77 error 400. Response:
<?xml version="1.0" encoding="UTF-8"?><Error><Code>InvalidArgument</Code><Message>**Invalid Argument: Date provided in &apos;date&apos; header (Mon, 16 Oct 2023 10:25:51 +0000) didn&apos;t parse successfully**</Message></Error>
2023-10-16 10:25:51 repo-mgr.c(7176): Failed to add commit.

It appears that R2 rejects the date header content Mon, 16 Oct 2023 10:25:51 +0000. What’s wrong with this header? Is it supposed to say GMT instead of +0000 perhaps?

Has anybody else tried R2 storage and hand any success?

Hello @despens , what’s the signature version of s3 are you using? I think perhaps it’s the compatibility with v4 signatures for R2.If the service support v2 signature, you may also try it out.

I’m using v4 signatures. Since other S3 compatible APIs seem to work fine with Seafile, the error is probably on Cloudflare’s side. They declare themselves that the implementation is not complete.