将文档添加到父文件夹?
Add a document to parent folder?
如何将此文档添加到父文件夹?以下无效。
drive.files.insert({
convert: true,
parents: [
{
"id":parentId
}
],
resource: {
title: title,
mimeType: 'text/csv',
},
media: {
mimeType: 'text/csv',
body: body,
}
}, function(){
console.log(arguments)
})
尝试:
drive.files.insert({
resource: {
title: title,
mimeType: 'text/csv',
parents: [ { id: parentId } ]
},
media: {
mimeType: 'text/csv',
body: body
},
}, function(err, resp) {});
看起来文档可能已经更改:
https://github.com/google/google-api-nodejs-client/issues/96
如何将此文档添加到父文件夹?以下无效。
drive.files.insert({
convert: true,
parents: [
{
"id":parentId
}
],
resource: {
title: title,
mimeType: 'text/csv',
},
media: {
mimeType: 'text/csv',
body: body,
}
}, function(){
console.log(arguments)
})
尝试:
drive.files.insert({
resource: {
title: title,
mimeType: 'text/csv',
parents: [ { id: parentId } ]
},
media: {
mimeType: 'text/csv',
body: body
},
}, function(err, resp) {});
看起来文档可能已经更改: https://github.com/google/google-api-nodejs-client/issues/96