Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8607077
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:15:24+00:00 2026-06-12T03:15:24+00:00

I having issues uploading large files form my Linux Desktop to GDrive (by using

  • 0

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::ResumableUploadclass.

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::ResumableUploadclass 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::Resultwhich 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)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:15:26+00:00Added an answer on June 12, 2026 at 3:15 am

    See the example for files.insert for the basics. In that example, it is using multipart, but switching to resumable is fairly straightforward. Mostly requires changing the uploadType parameter to ‘resumable’. The result from the insert/update will contain a reference to the uploader than you can use to send the content/check for completion.

    media = Google::APIClient::UploadIO.new(file_name, mime_type)
    result = client.execute(
      :api_method => drive.files.insert,
      :body_object => file,
      :media => media,
      :parameters => {
        'uploadType' => 'resumable',
        'alt' => 'json'})
    
    # Send content
    result.resumable_upload.send_all(client)
    

    In the upcoming beta release of the client library (any day now :), this will change slightly so that uploads work a little more uniformly regardless of protocol. Going forward in most cases, calling execute() will be sufficient and it will attempt to upload the file. But the existing method will still work. You’ll also be able resume by just calling:

    if !result.resumable_upload.complete?
       client.execute(result.resumable_upload) # Continue sending... 
    end
    

    Example doesn’t show the error handling, but you can check result.resumable_upload.complete? or .expired? to check the status. Incomplete resumable uploads expire after a period of inactivity (on the order of an hour or so.) If expired, you’ll need to restart from the beginning.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having issues uploading files using CURL with PHP (on Windows - if it
I am currently having issues uploading files to amazon S3 while using paperclip. It
I'm running WP 3.0.1 on a shared host using PHP5. I'm having issues uploading
I'm having a bit of an issue uploading files to a database. I'll post
Am having issues with printing different sized PDF's using GhostScript (V9.05). The PDF in
Im having issues getting this to work, maybe its not even possible? I have
I am having issues passing a dynamic parameter to a JavaScript function using innerHTML.
I'm having issues with a file uploading utility in my PHP application. When sending
I am having an issue when uploading files to tomcat. It seems that tomcat
Having issues trying to select html injected into the DOM using jquery's load. Works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.