问题描述
我们计划实施一项功能,让客户在自己的谷歌浏览器或Dropbox帐户(在我们的应用内)浏览他们的图片,并选择他们想要在我们的应用中使用的图片。然后,我们会将这些图片保存到我们的Google云存储(GCS)位置。
We are planning to implement a feature to let customers browse their images in their own google drive or dropbox accounts (within our app), and select ones they wanna use in our app. Then, we will save these images into our Google cloud storage (GCS) place.
一种简单的方法是使用OAuth将客户的图像从保管箱/驱动器下载到我们的本地磁盘,然后将它们上传到我们的GCS。
A simple approach is to use OAuth to download the customers' images from dropbox/drive to our local disk, then upload them to our GCS.
我想知道是否可以在Dropbox /驱动器和GCS之间进行直接传输? GCS确实为S3提供了。您还可以创建一个URL列表列表,但每个URL都需要公开访问,在我们的例子中似乎不可能。
I am wondering if it is possible to make a direct transfer between dropbox/drive and GCS? GCS does provide transfer service for S3. You can also create a list of URL list, but each URL needs to be publicly accessible, which in our case does not seem possible.
有没有关于如何更好的建议实现这个功能?谢谢
Is there any better suggestion on how to implement this feature? Thanks
推荐答案
你可以流式传输文件,至少你不必将它们保存到本地磁盘,我认为你的解决方案就是要走的路。
Well you could stream the files so at least you wouldn't have to save them to local disk, but other than that I think your solution is the way to go.
这取决于你的语言流的工作原理,但基本上你下载文件并立即上传到GCS曾经写过任何字节到本地磁盘。
It depends on your language how streaming works exactly, but basically you download the file and upload it to GCS right away without ever writing any bytes to local disk.
这篇关于将文件从Dropbox / Drive传输到Google云端存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!