【发布时间】:2020-06-29 23:18:33
【问题描述】:
我正在使用 Firebase 网络客户端,并希望将 gzip 压缩文件上传到 Cloud Storage。使用 Nodejs 客户端,可以简单地将 gzip 指定为一个选项,如下所示:await bucket.upload(filepath, { destination, gzip: true });。是否可以使用 Firebase 网络客户端将数据上传到云存储?例如,我将如何更改以下内容以 gzip 文件?
const ref = firebase.storage().ref().child("test.json");
const blob = new Blob([JSON.stringify({ hello: "world" })], { type: "application/json" });
await ref.put(blob);
【问题讨论】:
标签: firebase google-cloud-storage gzip firebase-storage