0
votes

const file = Drive.Files.insert({ title: 'Temp.pdf' }, blob, { ocr: true, ocrLanguage: "en" });

I have enabled Drive API(v2) from Resources->Advanced Google Services and also enabled Drive API in Google Cloud Platform API Dashboard for that particular project.

But this doesn't look like a one time activity. The error ReferenceError: Drive is not defined keeps coming every now and then. When I enable Drive API from Resources->Advanced Google Services, there is no error for some time and it comes again after some time. The setting in Resources->Advanced Google Services is not persisted.

Why is it not persisted? Am I missing something here?

1
Does this answer your question? ReferenceError: "Drive" is not defined - soMario
No. I have already tried that. The problem is I need to keep doing that setting. It's not persisted. - Ekalavya
Have you gone to https://console.cloud.google.com to enable the library? - Cooper
Yes. I have done that. - Ekalavya
Hi there @Ekalavya! To prevent any project misconfiguration, could you create a blank new script and copy your codelines there? - Jacques-Guzel Heron

1 Answers

1
votes

Figured out that reference error was occurring only after I perform a clasp push. Resolved.