R2 Pre-Sign URL PubObject Not work

Question

i used golang / TS / Python

However, the putObject pre-sign url in the Cloudflare docs example in all three languages does not work.

In addition, we can use aws-sdk-v2-go to generate putobject pre-sign url as an example, but the link does not work and only gets the following responses:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
    <Code>SignatureDoesNotMatch</Code>
    <Message>The request signature we calculated does not match the signature you provided. Check your secret access key and signing method. </Message>
</Error>

The funny thing here is that getObject works well. So my key is not wrong.
What the ■■■■ should I do?
I think Cloudflare needs to figure this out

CORS

Although it is not covered in this topic, cloudflarer2 has a problem that it does not support cors.

This topic was once asked a similar question to 2021.10.xx. However, it is still not applied even though it is almost a year.

Using Cloudflare workers to apply cors means you have to pay twice as much.
When are you going to put it on?

I’m not able to replicate this - the example in Configure `aws-sdk-js` for R2 · Cloudflare R2 docs worked just fine and I suspect the others will be the same.

Thank you. I solved it.

The problem was postman.

I set Cloudflare variable in collection to test another api in postman, and this variable was forcibly included in the header, which was a problem that came as a response to a question.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.