Create File with Google Drive Api v3 (javascript)

前端 未结 4 1044
情歌与酒
情歌与酒 2020-11-27 17:28

I want to create a file with content using Google Drive API v3. I have authenticated via OAuth and have the Drive API loaded. Statements like the following work (but produce

4条回答
  •  野性不改
    2020-11-27 17:49

    this works fine usin v3:

            var fileMetadata = {
                'name' : 'MaxBarrass',
                'mimeType' : 'application/vnd.google-apps.folder'
            };
    
            gapi.client.drive.files.create({
                resource: fileMetadata,
                fields: 'id'
            }).execute(function(resp, raw_resp) {
                console.log('Folder Id: ', resp.id);
            });
    

提交回复
热议问题