【问题标题】:Add a document to parent folder?将文档添加到父文件夹?
【发布时间】:2015-02-18 02:28:55
【问题描述】:

如何将此文档添加到父文件夹?以下不起作用。

drive.files.insert({
  convert: true,
  parents: [
    {
      "id":parentId
    }
  ],
  resource: {
    title: title,
    mimeType: 'text/csv',
  },
  media: {
    mimeType: 'text/csv',
    body: body,
  }
}, function(){
  console.log(arguments)
})

【问题讨论】:

    标签: javascript node.js google-api-nodejs-client


    【解决方案1】:

    试试:

        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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-09-08
      • 1970-01-01
      • 1970-01-01
      • 2016-02-02
      • 2011-09-15
      • 2012-07-03
      • 1970-01-01
      • 2018-08-01
      相关资源
      最近更新 更多