[Apps Script - Google Drive v2] The driveId parameter must be specified if and only if corpora is set to drive
@vinay-google 已经在做这个了。
开始于 2022年7月5日。
评估
这个 Issue 还没有评估数据。
描述
Summary
Getting an error when executing Google Drive (v2) Files.list even if corpora is set to 'drive' and driveId is supplied.
Expected Behavior
Google Drive API v2 Files.list method via Apps Script successfully retrieves files/folders under a Shared Drive when using corpora="drive" and supplying the driveId.
Sample URL:
Description:
Actual Behavior
Google Drive API v2 Files.list method via Apps Script fails with the following error:
Error in Apps Script logs:
Failed with error API call to drive.files.list failed with error: The driveId parameter must be specified if and only if corpora is set to drive.
Steps to Reproduce the Problem
- Create an Apps Script Project (setup OAuth)
- Add Google Drive (v2) library (v3 is not available)
- Copy and execute this function:
function getRetentionFolders() {
const queryFolder = "trashed=false and mimeType='application/vnd.google-apps.folder'";
var results = Drive.Files.list({
corpora: "drive",
id: <driveId of shared drive>,
q: queryFolder,
includeItemsFromAllDrives: true,
supportsAllDrives: true,
fields: 'items(kind,id,title,mimeType,createdDate,modifiedDate,parents,driveId)'
});
}
- 主要语言
- JavaScript
- 星标
- 5.2k
- 派生
- 2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleworkspace/apps-script-samples 的其他 Issue
-
难度 5/5 一周以上 新手友好度 1/100
googleworkspace/apps-script-samples#659 · 1 条评论 · 1 个 reaction ·
-
Password reset未关闭
难度 5/5 一周以上 新手友好度 15/100
googleworkspace/apps-script-samples#654 · 2 个 reaction ·
-
cod gs未关闭
难度 5/5 一周以上 新手友好度 10/100
googleworkspace/apps-script-samples#651 · 1 个 reaction ·
-
tespogrome未关闭
难度 5/5 一周以上 新手友好度 1/100
googleworkspace/apps-script-samples#624 · 1 个 reaction ·
-
Get_order_manually.gs可能重新可做 @vinay-google 于 243 天前认领,目前没有进行中的 PR。 未关闭
googleworkspace/apps-script-samples#616 · 已指派 1 人 ·
查看 googleworkspace/apps-script-samples 的全部 Issue
相似的 Issue
-
Notifications pagination accepts NaN and negative LIMIT/OFFSET可能已有人在做 @Senthil455 今天认领。 未关闭BUGS MEDIUM
难度 2/5 1-3 小时 新手友好度 62/100
elixpo/blogs.elixpo#419 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 65/100
immich-app/immich#32426 ·
维护者通常 1 天内回复
-
automated issue report
难度 1/5 1 小时以内 新手友好度 70/100
lirantal/discoprint#45 ·
维护者通常 1 天内回复