【发布时间】:2020-08-10 21:33:10
【问题描述】:
const file = Drive.Files.insert({ title: 'Temp.pdf' }, blob, { ocr: true, ocrLanguage: "en" });
我已从 Resources->Advanced Google Services 启用 Drive API(v2),并在 Google Cloud Platform API Dashboard 中为该特定项目启用 Drive API。 p>
但这看起来不像一次性活动。 ReferenceError: Drive is not defined 不时出现错误。当我从 Resources->Advanced Google Services 启用 Drive API 时,一段时间没有错误,一段时间后又出现。 Resources->Advanced Google Services 中的设置未保留。
为什么不持久化?我在这里遗漏了什么吗?
【问题讨论】:
-
这能回答你的问题吗? ReferenceError: "Drive" is not defined
-
没有。我已经试过了。问题是我需要继续做那个设置。它没有持久化。
-
你去
https://console.cloud.google.com启用图书馆了吗? -
是的。我已经做到了。
-
你好@Ekalavya!为了防止任何项目配置错误,您可以创建一个空白的新脚本并将您的代码行复制到那里吗?
标签: google-apps-script google-sheets google-drive-api google-apps-script-addon google-apps-script-api