如何通过https链接保存文件到Google Cloud Storage [英] How to save a file from an https link to Google Cloud Storage

查看:121
本文介绍了如何通过https链接保存文件到Google Cloud Storage的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想直接在Google云端存储中保存一个大文件(大约50 GB).我尝试了gsutil cp https://archive.org/download/archiveteam-twitter-stream-2015-08/archiveteam-twitter-stream-2015-08.tar gs://my/folder,但是没有用(InvalidUrlError: Unrecognized scheme "https").

I would like to save a large file (approximately 50 GB) directly on Google Cloud storage. I tried gsutil cp https://archive.org/download/archiveteam-twitter-stream-2015-08/archiveteam-twitter-stream-2015-08.tar gs://my/folder, but that didn't work (InvalidUrlError: Unrecognized scheme "https").

有没有一种方法,而不必先将文件下载到本地存储中?

Is there a way of doing that, without having to first download the file to my local storage?

谢谢!

推荐答案

您可以使用curl来获取URL并将其通过管道传递到gsutil.例如:

You can use curl to fetch the URL and pipe it to gsutil. For example:

curl -L https://archive.org/download/archiveteam-twitter-stream-2015-08/archiveteam-twitter-stream-2015-08.tar | gsutil cp - gs://your/folder/archiveteam-twitter-stream-2015-08.tar

这篇关于如何通过https链接保存文件到Google Cloud Storage的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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