【发布时间】:2020-01-05 04:56:09
【问题描述】:
我已经阅读了很多类似的错误,但是,我找到的解决方案对我不起作用。
更改个人资料图片时遇到问题,将图片加载到 Google Chrome 时出现以下错误。
错误如下:The request signature we calculated does not match the signature you provided. Check your Google secret key and signing method。
我在服务器中使用的代码如下:
const admin = require('firebase-admin');
admin.initializeApp();
const config = {
action: 'read',
expires: '03-01-2030'
};
thumbFile.getSignedUrl(config)
这是我通过服务器端获取signedUrl() 的代码。 为什么我的网址在一周左右后就失效了?
我已经阅读了以下答案,老实说,我很害怕: “Google Cloud Storage 签名 URL 的最长持续时间为 7 天。但也可以更短。永远不会更长。我猜 Firebase 存储也有同样的限制”
【问题讨论】:
标签: javascript firebase google-cloud-storage firebase-storage