How to update a file in google drive using Google drive API

1k views Asked by At

I am trying to update a file on google drive using google drive API. The body content does not work. I am trying with google simulator but do not know how to give the updated content in Body Request here. Below is the screenshot (In Parent attribute "id" is the Folder ID).

Google simulator screenshot

1

There are 1 answers

1
abielita On

You may follow this documentation.

For the request:

This method provides media upload functionality through two separate URIs. For more details, see the document on media upload.

  • Upload URI, for media upload requests: PATCH https://www.googleapis.com/upload/drive/v3/files/fileId
  • Metadata URI, for metadata-only requests: PATCH https://www.googleapis.com/drive/v3/files/fileId

Check these examples if it helps.