I\'m trying to use one file input element to upload multiple files to Drive using html form. This seems to work only for one file, although the file picker allows selecting
How about this sample script?
In this sample, the following flow is run.
When you use this, please copy and paste the Google Apps Script and HTML to the script editor, and run the HTML using the dialog, sidebar and Web Apps.
function saveFile(obj) {
var blob = Utilities.newBlob(Utilities.base64Decode(obj.data), obj.mimeType, obj.fileName);
return DriveApp.createFile(blob).getId();
}
index.html can be run as Web Apps and the side bar and dialog of Google Docs.