我正在尝试使用"已签名的网址"来访问/上传文件到Google云端存储(GCS).
按照https://developers.google.com/storage/docs/accesscontrol#Signing-Strings中的说明操作
我做了什么:
但是,我仍然得到这个(状态:403 Forbidden):
<?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 Google secret key and signing method.</Message>
<StringToSign>PUT
text/plain
1384084959392
x-goog-api-version:2
x-goog-project-id:99999
/mybucket/myfile.txt</StringToSign>
</Error>
Run Code Online (Sandbox Code Playgroud)
即使我根据"StringToSign"中的值对字符串进行重试,我仍然会得到相同的错误.
在这里阅读各种相关的帖子,但找不到任何解决方案,其中大部分是指x-goog-api-version:1我在使用版本2时.
我错过了什么?任何帮助将不胜感激.