linuxtazdad / google-api-python-client

Automatically exported from code.google.com/p/google-api-python-client
Other
0 stars 0 forks source link

Create new MediaUpload sub-class for Google Cloud Storage #335

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am trying to find the most efficient way to upload a video file > 1GB to 
YouTube using my Google App Engine cloud server.  In looking at the MediaUpload 
documentation [1], it says that you might need to extend MediaUpload for your 
resumable variation needed.  I can't imagine I'm the only person who would like 
to take a file that is in a blobstore or GCS and send it out via MediaUpload 
without loading the whole entity into a string first and then using 
MediaIoBaseUpload.  I'm going to try to write my own MediaGCSUpload sub-class, 
but if someone has already done this and it could be included as a standard 
sub-class, I believe it would help out many other developers.  The trick is to 
only load each chunk into memory for sending instead of loading the whole 
entity.  I've upgraded my GAE instance to the largest available and still goes 
over the 1GB memory allocation.

[1]: https://developers.google.com/api-client-library/python/guide/media_upload

Original issue reported on code.google.com by ra...@appalope.com on 10 Sep 2014 at 12:49