2 ms·
We have several examples [1]. I think you need to set s3ForcePathStyle to true for the first example (or however you do it in the v3 version of the SDK[2]). Fo
by vlovich123 5y ago
We have several examples [1].
I think you need to set s3ForcePathStyle to true for the first example (or however you do it in the v3 version of the SDK[2]). For the latter, we don't support pre-signed requests. Feel free to ask on discord [3] too. Might get more timely responses.
[1] https://developers.cloudflare.com/r2/examples https://developers.cloudflare.com/r2/examples
[2] https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-s3/interfaces/bucketendpointinputconfig.html https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clien...
[3] https://discord.gg/cloudflaredev https://discord.gg/cloudflaredev
- eins1234 5y agoThanks for the resources! I managed to get both working in the end. Some notes for future readers: For SDK v3, I just needed to add the forcePathStyle flag. For aws4fetch (note that this isn't a presigned request, it's just signing the request for Sig V4 like the official SDK would), I needed to change the fetch url to https://my-account-id.r2.cloudflarestorage.com/my-bucket/key https://my-account-id.r2.cloudflarestorage.com/my-bucket/key.