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

  • Home
  • SEARCH
  • 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 8328901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:35:20+00:00 2026-06-09T01:35:20+00:00

I do know about the two previous posts: PHP Google Drive API – File

  • 0

I do know about the two previous posts:

  • PHP Google Drive API – File Upload Only As "Untitled"-File Or Just Without Content
  • Google Drive PHP SDK saves an Untitled file

But apart from the answer ‘are you sure you’re using the latest release’, none of the askers have come back to say if yes or no or if they’ve managed to find an answer.

Because I’m doing the same thing as them, I’m using the latest apiDriveService.php with the last revision dated from June 2012.

The data is correctly found but when you arrive at the insert line, clearly, something wrong happens.

And I don’t understand why for the SDK php example, it seems to go correctly.

Is this a problem in the Google Api Console? Or do I need to encode the data in something special?

EDIT: in the apiDriveService file, I can see this line:

$this->files = new FilesServiceResource($this, $this->serviceName, 'files', json_decode('{"methods": {
"insert": {"scopes": ["https://www.googleapis.com/auth/drive", "https://www.googleapis.com/auth/drive.file"],
"parameters": {"convert": {"default": "false", "type": "boolean", "location": "query"}, "targetLanguage": {"type": "string", "location": "query"}, "sourceLanguage": {"type": "string", "location": "query"}, "ocrLanguage": {"type": "string", "location": "query"}, "pinned": {"default": "false", "type": "boolean", "location": "query"}, "ocr": {"default": "false", "type": "boolean", "location": "query"}, "timedTextTrackName": {"type": "string", "location": "query"}, "timedTextLanguage": {"type": "string", "location": "query"}}, "supportsMediaUpload": true, "request": {"$ref": "File"}, "mediaUpload": {"maxSize": "10GB", "accept": ["*/*"], "protocols": {"simple": {"path": "/upload/drive/v2/files", "multipart": true}, "resumable": {"path": "/resumable/upload/drive/v2/files", "multipart": true}}}, "id": "drive.files.insert", "httpMethod": "POST", "path": "files", "response": {"$ref": "File"}}, ...);

In the parameters I’m sending, there is data and mimetype:

$created = $apiService->files->insert($driveFile, array('data' => $data,'mimeType' => $mimeType));

And in the insert function, there is an array_merge with data and mimetype:

public function insert(DriveFile $postBody, $optParams = array()) {
  $params = array('postBody' => $postBody);
  $params = array_merge($params, $optParams);
  $data = $this->__call('insert', array($params));
  if ($this->useObjects()) {
    return new DriveFile($data);
  } else {
    return $data;
  }
}

I don’t find them in the insert part of the line I’ve mentionned above. Is it tied to that?

  • 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-09T01:35:23+00:00Added an answer on June 9, 2026 at 1:35 am

    Just check out the current API Client from Google SVN.
    http://code.google.com/p/google-api-php-client/source/checkout
    We had the same problem but after doing an svn checkout, it magically worked and thanks to Alain and Claudio for their swift response on this.

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

Sidebar

Related Questions

I know there are two posts about this error on SO. Like every google
I know about DATEDIFF(d, date1, date2), but I am not looking to subtract two
I know that PHP4 is dead, however there are about two dozen or so
So I don't know much about SQL or VBScript, much less putting the two
I read some useful posts here on SO about previous maven questions, I'm currently
I am aware of the previous two questions which talk about nesting partial views
Yes, I know there are countless posts about sliding images right to left (and
I know about git diff branch1 branch2 . However, I would like to see
I know about the LINEABOVE and LINEBELOW styles, i was wondering if there is
I know about http://www.upcdatabase.com/ , but it's quite incomplete. Where popular mobile apps getting

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.