I having issues uploading large files form my Linux Desktop to GDrive (by using Grive which does not offer recovery or even monitoring of larger uploads).
So I came up trying to use google-api-ruby to write a small script doing the job.
As Google drives documentation talks about Resumable uploads – https://developers.google.com/drive/manage-uploads#resumable – I was trying to implement Resumable uploads using google-api-ruby and found Google::APIClient::ResumableUpload
class.
Samples are quite useful to understand the principle of how this rubyish API works, but the samples don't broach the issuse of Resumable uploads.
Is Google::APIClient::ResumableUpload
class ment to be used for Resumable uploads the documenation is talking about or rather a conveicence class provided by this Ruby client?
Google::APIClient::ResumableUpload
constructor consumes a Google::APIClient::Result
which I get, when I call execute
or execute! on a Google::APIClient
instance.
As far as I understand execute
method will only work on Google API methods which are exposed to Discovery API (such as drive.files.insert
).
Unfortunalty Resumable uploads are tied to following URI:
https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable
and does not seem to be part of Discovery yet or integegrated into a 'cleaner' URI scheme (why upload/drive
instead of drive/upload
?).
Is it possible to use Google::APIClient
execute methods for this API URI in order to combine it with Google::APIClient::ResumableUpload
oder do I have to implement Resumable uploads by myself (e.g. by using em-http-request
)?