Any word on when this will hit the main API documentation? Would you suggest using an S3 API library in the mean time?
I’m not too sure what you mean by this.
Presigned URLs is inherently a S3 concept so it’ll be no different to any other S3 implementation. Use an AWS SDK, rclone, the AWS CLI, etc
I have some PRs up as simple demos but it’s no different to how you’d do it with S3.
[R2] Add presigned links example to rclone by KianNH · Pull Request #4856 · cloudflare/cloudflare-docs · GitHub - rclone
[R2] Add presigned links example to AWS cli by KianNH · Pull Request #4857 · cloudflare/cloudflare-docs · GitHub - aws cli
[R2] Add presigned links example to aws-sdk-js by KianNH · Pull Request #4858 · cloudflare/cloudflare-docs · GitHub - aws-sdk-js
[R2] Add presigned links example to aws-sdk-php by KianNH · Pull Request #4860 · cloudflare/cloudflare-docs · GitHub - aws-sdk-php
Sorry, I should have been more clear. I meant this page api_dot_cloudflare_dot_com which appears to be the official API. I assume a feature must be documented there before it hits the official Node.js bindings for example.
Is this feature only to intended to satisfy current S3 users looking to migrate? Is there a more preferable alternative to pre-signing urls for R2 for client side file uploads?
PS: sorry it won’t let me insert links
I’m not sure if it’ll ever hit those docs - it’s not really a Cloudflare client API, just an S3-compatible API of R2.
You can do client-side file uploads with a Worker to implement any logic you want or stick with S3 presigned URLs.
Hi… I concocted a very simple c# console application that initializes the multipart upload, uploads the file and finally finalizes the upload. I tried it on seaweed s3 serves and it works fine. But on R2 I get status code 403 (Forbidden).
You can find the code on my public github repository “github dot com slash tadejp13 slash R2UploadTest” - sorry it won’t let me insert links
Please insert the correct bucket, key, secret and s3 url in Program.cs lines 10 to 13
Thank you and best regards,
Did somebody try my test app?