python - 谷歌自己的参考示例甚至不起作用?为 GCS 编写自定义签名 URL
问题描述
我已按照此参考中所示的说明进行操作,但是我收到“签名不匹配错误”,我不知道为什么。
Coincidentally, Google's reference example for this
https://storage.googleapis.com/example-bucket/cat.jpeg?X-Goog-Algorithm=
GOOG4-RSA-SHA256&X-Goog-Credential=example%40example-project.iam.gserviceaccount
.com%2F20181026%2Fus-central-1%2Fstorage%2Fgoog4_request&X-Goog-Date=20181026T18
1309Z&X-Goog-Expires=900&X-Goog-SignedHeaders=host&X-Goog-Signature=247a2aa45f16
9edf4d187d54e7cc46e4731b1e6273242c4f4c39a1d2507a0e58706e25e3a85a7dbb891d62afa849
6def8e260c1db863d9ace85ff0a184b894b117fe46d1225c82f2aa19efd52cf21d3e2022b3b868dc
c1aca2741951ed5bf3bb25a34f5e9316a2841e8ff4c530b22ceaa1c5ce09c7cbb5732631510c2058
0e61723f5594de3aea497f195456a2ff2bdd0d13bad47289d8611b6f9cfeef0c46c91a455b94e90a
66924f722292d21e24d31dcfb38ce0c0f353ffa5a9756fc2a9f2b40bc2113206a81e324fc4fd6823
a29163fa845c8ae7eca1fcf6e5bb48b3200983c56c5ca81fffb151cca7402beddfc4a76b13344703
2ea7abedc098d2eb14a7
还会给出签名不匹配错误。
https://cloud.google.com/storage/docs/access-control/signed-urls
解决方案
推荐阅读
- javascript - 您使用什么数据类型将字典传递给 httpsCallable 函数?
- xml - XML 允许的字符
- manpage - 我的手册页输出未从显示的第一行开始
- swift - Swift:将 17x16 像素数据缩放为 8x8
- android - Java Android 项目实机部署 Kotlin 库集成后耗时太长
- matlab - 图像的二维傅里叶变换的 Matlab 错误
- ios - 来自 SwiftUI 的 UIImage 在接收器端的 iMessage 中显示模糊
- spring-security - 使用 WebSecurityConfigurerAdapter 向任何人授权注册页面
- laravel - 发布跟踪 - 与最近发布无关的错误
- python - 遍历 driver.get 链接 Selenium Python