Skip to content

Error: Body attribute missing in multipart #139

@sridharAJ

Description

@sridharAJ

i am using drive version2 to insert a new file to google-drive.
To insert a new file to a google drive using client.files.insert() function

i am getting the following error:

Error: Body attribute missing in multipart.

var auth = new googleapis.OAuth2Client();

auth.setCredentials({
  access_token: 'accesskey'
});

googleapis.discover('drive', 'v2').execute(function(err, client) {
      client.drive.files.insert({ title: 'Test', mimeType: 'application/json' })
    .withMedia('application/json', "Hello world")
    .withAuthClient(auth)
    .execute(function(error,result){
      if(error){
        console.log(error);
      }else{
        console.log(result);
      }
    });

what is problem 20days back the above code is worked for me.but now its not.
is there any update happened in gopogleapis module or requestjs?

Metadata

Metadata

Assignees

Labels

🚨This issue needs some love.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions