March 2016
Beginner to intermediate
232 pages
4h 29m
English
You can create an application to upload any file to Drive from the browser. Create the doGet and uploadFiles functions in the Code.gs file as listed here:
In the Code.gs file, add this code:
function doGet() { // Let's return html page created from the Form.html file. return HtmlService.createHtmlOutputFromFile('Form.html') .setTitle("File Upload"); }; function uploadFiles(form) { // You can change the folder name as you like. var folderName = "Uploaded Files"; var folder, folders = DriveApp.getFoldersByName(folderName); // folders is an iterator. if (folders.hasNext()) folder = folders.next(); // Let's create a folder if it does not exist. else folder = DriveApp.createFolder(folderName); // Let's create the file, ...Read now
Unlock full access