I am trying to use cyberduck to upload a file larger than 300mb. I get an error
deleting a file, downloading, creating a folder is fine.
API set to full access
I am trying to use cyberduck to upload a file larger than 300mb. I get an error
deleting a file, downloading, creating a folder is fine.
API set to full access
I got a similar error when I tried to use “curl” to interact with the “S3-compatible” API’s that Cloudflare provided. I tried to use curl to push a file to R2 and got several different warnings about missing headers and such. I gave up and ended up using Ansible’s ‘community.aws.s3_sync’ module to handle the upload and it worked fine. Any “s3” compatible program should work, like the “aws s3 …” command or rclone. It seems like S3 API now has a lot more required headers and rather than tracking them down one by one and also trying to figure out what values to set it to (because Cloudflare’s S3 API implementation doesn’t support all the parameters) seemed to be too problematic. What program are you using to try and upload to the R2 bucket?
FYI this was my results:
$ curl -X PUT -H "Content-Type: image/png" -H "Authorization: Bearer xxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyyyyyyy" --data-binary "/tmp/test.png" https://###################.r2.cloudflarestorage.com/test-bucket
<?xml version="1.0" encoding="UTF-8"?><Error><Code>InvalidRequest</Code><Message>Missing x-amz-content-sha256</Message></Error>
So I tried to add that “x-amz-content-sha256” header:
$ curl -X PUT -H “Content-Type: image/png” -H “Authorization: Bearer xxxxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyyyyyyyyyyyyy” --data-binary “/tmp/test.png” -H “x-amz-content-sha256: UNSIGNED-PAYLOAD” https://###################.r2.cloudflarestorage.com/test-bucket
<?xml version="1.0" encoding="UTF-8"?>`InvalidArgument` Invalid Argument: No date provided in x-amz-date nor date header
Now it wanted the “x-amz-date” header and I figured I’m not going down this rabbit hole and gave up.
I chose another service in which I was able to upload my file (600 mb) via the web interface in 3 minutes, and not spend the whole day studying very stupid and incomprehensible programs.
Thanks for the quick help (not)