1 回答

TA貢獻(xiàn)1796條經(jīng)驗(yàn) 獲得超7個(gè)贊
使用Advanced Drive Service而不是DriveApp
實(shí)際上,共享驅(qū)動(dòng)器
DriveApp
不受范圍限制但是,如果您啟用,您
Advanced Drive Service
將能夠在 Apps Script 中使用支持共享驅(qū)動(dòng)器的Drive API v2的所有方法
樣本:
function myFunction() {
var sharedDriveName = Drive.Drives.get("XXXXXXXXXXXXXXXXXXX").name;
//it is important to specify that the folder is located on a shared drive with {"supportsAllDrives": true}
var folderOnDriveName = Drive.Files.get("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",{"supportsAllDrives": true}).title;
var folderPermissions = Drive.Permissions.list("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",{"supportsAllDrives": true});
}
添加回答
舉報(bào)