How to upload multiple files using one file input element

adamtiger

New Member
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 multiple files. Back in the script log viewer, I only see one file captured of the two I uploaded. Is this unsupported, or am I going the wrong way about it?Code.gs:\[code\]function logForm(form) { Logger.log(JSON.stringify(form)); return true;}\[/code\]index.html:\[code\]<html> <form id="uploadTest" enctype="multipart/form-data"> <input type="file" multiple="multiple" name="fileUpload"> <input type="button" id="upload" value="http://stackoverflow.com/questions/15726439/upload" onclick="google.script.run.logForm(document.getElementById('uploadTest'));"> </form></html>\[/code\]Log view:\[code\]{"fileUpload":{"contents":"GIF87a\u0001\u0000\u0001\u0000?\u0000\u0000?????,\u0000\u0000\u0000\u0000\u0001\u0000\u0001\u0000\u0000\u0002\u0002D\u0001\u0000;","type":"image/gif","name":"1x1.gif","length":35}}\[/code\]
 
Top