Transfer file from URL to Cloud Storage

前端 未结 2 1167
不知归路
不知归路 2020-11-30 15:58

I\'m a Ruby dev trying my hand at Google Cloud Functions written in Python and have hit a wall with transferring a remote file from a given URL to Google Cloud Storage (GCS)

2条回答
  •  伪装坚强ぢ
    2020-11-30 16:23

    Directly transferring URLs into GCS is possible through the Cloud Transfer service, but setting up a cloud transfer job for a single URL is a lot of overhead. That sort of solution is targeted towards a situation with millions of URLs that need to become GCS objects.

    Instead, I recommend writing a job that pumps an incoming stream from reading a URL into a write stream to GCS and running that somewhere in the Google Cloud close to the bucket.

提交回复
热议问题