Is it possible to upload a file by url to cloud st

2019-03-01 07:19发布

To upload a file from url to a cloud storage system, usually it is required to download that file on a server, and then upload it to the cloud storage.

For large files, it may be required to write the file on disk instead of memory. Since app engine does not support writing on disks, are there any other options for doing this on app engine?

I understand that managed vm is an option, but I'm trying to make sure that it's definitely not possible to do this on classic app engine.

2条回答
一夜七次
2楼-- · 2019-03-01 07:57

To overcome the lack of local disk on GAE you can:

To download the files to GAE you could use the URL service. But there are 2 limitations to keep an eye on:

If the server offering the downloads supports multi-part downloads it might be possible to get a solution working for any file sizes with this info.

Note: this is just theoretical, I've only thought about this, I didn't actually tried it.

查看更多
手持菜刀,她持情操
3楼-- · 2019-03-01 08:05

Yes, it's possible. You can generate an upload URL (using Cloud Storage API) and provide it to a client that should use it in a POST request.

Here is docs for PHP but this approach should be working for Python as well.

Here is an example: https://github.com/GoogleCloudPlatform/storage-signedurls-python

查看更多
登录 后发表回答