如何将文件从https链接保存到Google云端存储

时间:2016-02-04 19:19:08

标签: 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")。

有没有办法做到这一点,而不必先将文件下载到我的本地存储?

谢谢!

1 个答案:

答案 0 :(得分:5)

您可以使用curl获取URL并将其传递给gsutil。例如:

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