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 8189763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:23:31+00:00 2026-06-07T03:23:31+00:00

Following is the method adopted to upload file to specific folder using Gdrive V2

  • 0

Following is the method adopted to upload file to specific folder using Gdrive V2 sdk.
1) insert file to root folder (Drive.Files.insert(File,AbstractInputStream)
2) Delete the root parent reference of the new uploaded file
3) Add the specific target folder as the new parent reference to the file.

The above works.
But, if network is slow, we see the file sitting at the Root folder for quite some time before it moves to the specific target folder. How can we avoid this? Can we batch all the above three operations? But AFAIK, batching is supported for operations of a particular type like..we can batch only all Files operations or Parent operations or Revision operations. Can we batch operations belonging to different types, for example (Files.insert() and Parent.delete())?

Inputs will be appreciated.

Thanks!!

  • 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-07T03:23:33+00:00Added an answer on June 7, 2026 at 3:23 am

    you can create file in specified folder directly by setting parents field in metadata.

    {
      "title" : "test.jpg",
      "mimeType" : "image/jpeg",
      "parents": [{
        "kind": "drive#file",
        "id": "<folderId>"
      }]
    }
    

    This is what I am doing in python, but I believe there is a relevant in java.

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

Sidebar

Related Questions

I have the following method, which takes in the name of a file as
using following method on Path button click: public static void pathButtonAction() { JFileChooser chooser
I am using following method to check if device has access to internet. In
I'm using the following method to determine the number of days between two NSDate's
I put the following method in my application.js file. var formhandler = function() {
The following method, based on code in this question , shows a file download
I have the following method for bulk insert of the data in tables. First
I got the following method which is used to read a txt file and
I have the following method that is supposed to open the file that is
The following method calculates cost. It access other classes when required. Cloud class holds

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.