node.js - Error: Body attribute missing in multipart while using googleapis node module -


I'm using Drive version 2 to put a new file on google-drive. I am getting the following error to insert a new file into a Google Drive using the Client.files.insert () function

Error: The body feature is missing in multilayer.

  var Auth = new googleapis.OAuth2Client (); Auth.setCredentials ({access_token: 'accesskey'}); ('Title', 'v2' application / json ',' hello world ') .withAuthClient (auth). Execute (function (error, result) {if (error) {console.log (error);} else {console.log (result);}});   

The above code is in the document:

Anyone can help me!

Be sure that you have enabled the Drive API:

  • Go.
  • Choose a project.
  • Select API and AIT in the left sidebar.
  • Search drive API in the list of available APIs and set its status ON .

Comments

Popular posts from this blog

python - how we can use ajax() in views.py in django? -

matlab - Using loops to get multiple values into a cell -

python - Sequence Pattern recognition with Pybrain -