复制Firebase存储上的文件? [英] Copy a file on firebase storage?

查看:43
本文介绍了复制Firebase存储上的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将现有文件复制到Firebase存储上而无需再次上传?

Is it possible to copy an existing file on firebase storage without needing to uploading it again?

我需要它来发布我的应用程序的发布版本/工作版本.

I need it for a published/working version setup of my app.

推荐答案

Firebase Storage API中没有方法可以复制已经上传的文件.

There is no method in the Firebase Storage API to make a copy of a file that you've already uploaded.

但是Firebase Storage是建立在Google Cloud Storage之上的,这意味着您也可以使用后者的API.您似乎正在寻找 gsutil cp .来自文档:

But Firebase Storage is built on top of Google Cloud Storage, which means that you can use the latter's API too. It looks like gsutil cp is what you're looking for. From the docs:

gsutil cp 命令允许您在本地文件系统和云之间复制数据,在云内部复制数据,以及在云存储提供商之间复制数据.

The gsutil cp command allows you to copy data between your local file system and the cloud, copy data within the cloud, and copy data between cloud storage providers.

请记住, gsutil 拥有对存储桶的完全访问权限.因此,它可以在您完全信任的设备(例如服务器或您自己的开发计算机)上运行.

Keep in mind that gsutil has full access to your storage bucket. So it is meant to be run on devices you fully trust (such as a server or your own development machine).

这篇关于复制Firebase存储上的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆