Accessing Files and Folders in Team Drive

前端 未结 2 959
日久生厌
日久生厌 2020-12-12 06:25

I\'m using Google Apps Script and V2 of the Drive API (I don\'t think V3 is available in scripts yet) to automate file creation inside of a Team Drive. I\'d like to add edit

2条回答
  •  孤街浪徒
    2020-12-12 07:00

    You can access but there's alot you can't do like removeFile() or getUrl() even when you have full access. You will still get the

    {error: "Exception: Cannot use this operation on a Team Drive item."}
    

    Workaround is to use setTrashed() instead of removeFile() on files/folders.

提交回复
热议问题