-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix for drive.file scope by adding .setAppId() - make a call to Drive.Files.get() to get the file metadata after picking the file - render the full picker response with the drive file response - add manifest to the picker example to force the picker to use the drive.file scope
- Loading branch information
Showing
4 changed files
with
189 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,5 @@ | ||
# File Picker Sample | ||
|
||
This sample shows how to create a "file-open" dialog in Google Sheets that | ||
allows the user to select a file from their Drive. It does so by loading | ||
[Google Picker](https://developers.google.com/picker/), a standard G Suite | ||
client-side API for this purpose. More information is available in the Apps | ||
Script guide | ||
[Dialogs and Sidebars in Google Workspace Documents](https://developers.google.com/apps-script/guides/dialogs#file-open_dialogs). | ||
This sample shows how to create a "file-open" dialog in Google Sheets thatallows the user to select a file from their Drive. It does so by loading [Google Picker](https://developers.google.com/picker/), for this purpose. More information is available in the Apps Script guide [Dialogs and Sidebars in Google Workspace Documents](https://developers.google.com/apps-script/guides/dialogs#file-open_dialogs). | ||
|
||
Note that this sample expects to be | ||
[bound](https://developers.google.com/apps-script/guides/bound) | ||
to a spreadsheet. | ||
Note that this sample expects to be [bound](https://developers.google.com/apps-script/guides/bound) to a spreadsheet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"timeZone": "America/Los_Angeles", | ||
"exceptionLogging": "STACKDRIVER", | ||
"runtimeVersion": "V8", | ||
"oauthScopes": [ | ||
"https://www.googleapis.com/auth/script.container.ui", | ||
"https://www.googleapis.com/auth/drive.file" | ||
], | ||
"dependencies": { | ||
"enabledAdvancedServices": [ | ||
{ | ||
"userSymbol": "Drive", | ||
"version": "v3", | ||
"serviceId": "drive" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters