Google cloud storage 从客户端上传到谷歌云存储签名url

Google cloud storage 从客户端上传到谷歌云存储签名url,google-cloud-storage,Google Cloud Storage,我已经从google云存储中生成了一个签名url,当我通过postman上传文件时,它可以正常工作,但不可能从客户端上传文件。我已经尝试了所有的方法:fetch、axios、xmlRequest–随便你说。请帮帮我 const files=Array.from(event.target.files) 常量文件:any=文件[0] const{data:{signedUrl}}=wait axios.get('https://localhost:3000/signedUrlUpload') 试试

我已经从google云存储中生成了一个签名url,当我通过postman上传文件时,它可以正常工作,但不可能从客户端上传文件。我已经尝试了所有的方法:fetch、axios、xmlRequest–随便你说。请帮帮我

const files=Array.from(event.target.files)
常量文件:any=文件[0]
const{data:{signedUrl}}=wait axios.get('https://localhost:3000/signedUrlUpload')
试试{
const resp=等待取数(signedUrl{
方法:'放',
正文:文件,
标题:{
“内容类型”:“音频/波形”
}      
})
控制台日志(resp);
}捕获(e){
控制台错误(e);

}
当它不起作用时,会出现什么样的错误?你能粘贴一个示例请求和错误吗?@BrandonYarbrough done!你能发布实际的HTTP响应吗?嗯,我不知道为什么axios会给你“TypeError:Failed to fetch”,但它的信息量不大。