Google Drive API V3 -Simple在文件夹问题中创建一个文件夹

时间:2017-04-18 07:07:56

标签: rest api

这是我在IN SUBFOLDER中创建文件夹的简单REST调用。

它一直把它放在ROOT FOLDER中。

POST https://content.googleapis.com/drive/v3/files -H"授权:Bearer {token}"

{
    "name": "myfirstfolder",
    "mimeType": "application/vnd.google-apps.folder",
    "parents": [
                   {
                      "id": "0B91rpF8r40YJaHJpSXpvWmxPVkk" 
                   }
               ]
}

1 个答案:

答案 0 :(得分:2)

如何修改?

之前:

{
    "name": "myfirstfolder",
    "mimeType": "application/vnd.google-apps.folder",
    "parents": [
                   {
                      "id": "0B91rpF8r40YJaHJpSXpvWmxPVkk" 
                   }
               ]
}

之后:

{
    "name": "myfirstfolder",
    "mimeType": "application/vnd.google-apps.folder",
    "parents": ["0B91rpF8r40YJaHJpSXpvWmxPVkk"]
}

如果这不起作用,我很抱歉。