-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCode.gs
40 lines (37 loc) · 970 Bytes
/
Code.gs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const DEVELOPER_KEY = '<YOUR-DEV-KEY>';
function doGet() {
return HtmlService
.createTemplateFromFile("picker")
.evaluate()
.addMetaTag("viewport", "width=device-width, initial-scale=1")
.setTitle("Google Drive Picker")
.setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
}
function include(fileName) {
return HtmlService
.createHtmlOutputFromFile(fileName)
.getContent();
}
function initPicker() {
return {
locale: 'en',
token: ScriptApp.getOAuthToken(),
origin: "https://script.google.com",
parentFolder: "",
developerKey: DEVELOPER_KEY,
dialogDimensions: {
width: 600,
height: 425
},
picker: {
viewMode: "LIST",
mineOnly: false,
mimeTypes: "application/vnd.google-apps.spreadsheet",
multiselectEnabled: true,
allowFolderSelect: true,
navhidden: true,
hideTitle: true,
includeFolders: true,
}
};
}