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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:33:12+00:00 2026-06-11T08:33:12+00:00

I tried to make a resumable upload without much success. I read the https://developers.google.com/drive/manage-uploads#resumable

  • 0

I tried to make a resumable upload without much success.

I read the https://developers.google.com/drive/manage-uploads#resumable page but I can’t figure out how to get this “Location” header in the response of the first request.

The API documentation specify that we can make either a POST or a PUT on the first URL, but if I make a PUT, I get a 404, and if I make a POST I get a new file created with no content and no Location header in the response.

Here is my POST query (with a PUT and exactly the same query it returns a 404):

POST https://www.googleapis.com/drive/v2/files?uploadType=resumable
Accept = application/json
Authorization = Bearer xxxxxxxxx
Content-Length = 71
Content-Type = application/json
X-Upload-Content-Length = 10
X-Upload-Content-Type = text/plain

{
    mimeType = "text/plain";
    parents =     (
                {
            id = root;
        }
    );
    title = "test.txt";
}

and the response:

"Cache-Control" = "no-cache, no-store, max-age=0, must-revalidate";
"Content-Type" = "application/json; charset=UTF-8";
Date = "Wed, 29 Aug 2012 09:53:15 GMT";
Etag = "\"UlXjrWs5BKksMni8RDMKhlFkHGQ/MTM0NjIzMzk5NTA2MQ\"";
Expires = "Fri, 01 Jan 1990 00:00:00 GMT";
Pragma = "no-cache";
Server = GSE;
"Transfer-Encoding" = Identity;
"X-Content-Type-Options" = nosniff;
"X-Frame-Options" = SAMEORIGIN;
"X-XSS-Protection" = "1; mode=block";

{
 "kind": "drive#file",
 "id": "xxxx",
 "etag": "\"xxxx\"",
 "selfLink": "https://xxxx",
 "webContentLink": "https://xxxx",
 "alternateLink": "https://xxxx",
 "title": "test.txt",
 "mimeType": "text/plain",
 "labels": {
  "starred": false,
  "hidden": false,
  "trashed": false,
  "restricted": false,
  "viewed": true
},
"createdDate": "2012-08-29T09:53:15.200Z",
"modifiedDate": "2012-08-29T09:53:15.061Z",
"modifiedByMeDate": "2012-08-29T09:53:15.061Z",
"lastViewedByMeDate": "2012-08-29T09:53:15.061Z",
"parents": [
{
 "kind": "drive#parentReference",
 "id": "xxxx",
 "selfLink": "https://xxxx",
 "parentLink": "https://xxxx",
 "isRoot": true
}
],
"downloadUrl": "https://xxxx",
"userPermission": {
  "kind": "drive#permission",
  "etag": "\"xxxx\"",
  "id": "me",
  "selfLink": "https://xxxx",
  "role": "owner",
  "type": "user"
},
"originalFilename": "test.txt",
"fileExtension": "txt",
"md5Checksum": "xxxx",
"fileSize": "0",
"quotaBytesUsed": "0",
"ownerNames": [
"xxxx"
],
"lastModifyingUserName": "xxxx",
"editable": true,
"writersCanShare": true
}
  • 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-11T08:33:13+00:00Added an answer on June 11, 2026 at 8:33 am

    The HTTP Request specified in the Files Insert documentation page ( https://developers.google.com/drive/v2/reference/files/insert) is the following :

    POST https://www.googleapis.com/drive/v2/files
    

    But it’s wrong. The correct method is specified on the Upload Files page (https://developers.google.com/drive/manage-uploads#resumable) and is :

    POST https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable
    

    Note the upload in the URL. Tricky!

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

Sidebar

Related Questions

Tried to make a little old school ajax (iframe-javascript) script. A bit of mootools
I tried to make an alert popup with A with: var a = \u0041;
I tried to make a layout look like it It looks like kinda button
I tried to make an asynchronous UDP client using boost::asio I get some code
I tried to make a click counter in MySQL, but it dose not seem
I tried to make my textbox type in currency format. I did it, but
I tried to make a new bare git repository but I get this error:
I tried to make admin panel and I am using sessions , but have
I tried using make defconfig to compile the kernel, but as expected, it failed
I tried to make an independent copy of an array but couldnt get one.

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.