简体   繁体   English

如何一次性上传上千个文件夹到firebase存储

[英]How to upload thousands of folders to firebase storage at once

I have a client that needs to upload thousands of folders to firebase storage at one time.我有一个客户端需要一次上传数千个文件夹到 firebase 存储。 I have tried uploading a.zip file, but can not figure out how to unzip it.我试过上传 a.zip 文件,但不知道如何解压它。 I have followed every guide out there.我已经遵循了那里的所有指南。

Is there a way to batch upload thousands of file folders to a google cloud storage bucket at one time?有没有办法一次批量上传数千个文件夹到谷歌云存储桶?

To add to John Hanley's comment:添加到 John Hanley 的评论中:

You must upload each file.您必须上传每个文件。 You can upload in parallel.您可以并行上传。 Google Cloud Storage does not provide processing power to do things like unzipping files. Google Cloud Storage 不提供执行解压缩文件等操作的处理能力。 Google published a CLI to upload files: gsutil . Google 发布了一个 CLI 来上传文件: gsutil

If you have a large number of files to transfer, you can perform a parallel multi-threaded/multi-processing copy using the top-level gsutil -m option:如果要传输大量文件,可以使用顶级 gsutil -m选项执行并行多线程/多处理复制:

gsutil -m cp -r dir gs://my-bucket

Additionally, in Parallel Composite Upload , gsutil can automatically use object composition to perform uploads in parallel for large, local files being uploaded to Cloud Storage.此外,在Parallel Composite Upload中,gsutil 可以自动使用 object 组合对上传到 Cloud Storage 的大型本地文件执行并行上传。 You can also check this documentation regardingUploads , that discusses size considerations in uploading, and further explanation of Parallel Composite Uploads .您还可以查看有关上传的文档,其中讨论了上传中的大小注意事项,以及对并行复合上传的进一步解释。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM