Uploading files with Flask (running on App Engine)

2019-09-02 09:40发布

I would like to upload a file to Google Drive using Flask which runs on App Engine. I got Google Drive service (constructed with Google Drive API) up and running and was able to upload a file from the server using files().insert(...).

Now I would like to implement uploading via HTML form. This gives me a FileStorage object. How should I proceed from this point in order to get the file inside Google Drive?

Please note that I'm uploading files that exceed App Engine's 5MB limit on request size.

Thank you for your suggestions.

1条回答
走好不送
2楼-- · 2019-09-02 10:36

Upload the form to blobstore with a callback into your frontend. If the file is very large you might need to go as far as a backend with resumable uploads done on chained backends (as backends could also go down in the middle of the upload for huge files)

查看更多
登录 后发表回答