我正在尝试使用一个文件输入元素将多个文件上传到使用html表单的Drive。这似乎只适用于一个文件,尽管文件选择器允许选择多个文件。回到脚本日志查看器,我只看到我上传的两个文件中的一个。这是不受支持的,还是我走错了路?
Code.gs:
function logForm(form) {
Logger.log(JSON.stringify(form));
return true;
}
index.html:
<html>
<form id="uploadTest" enctype="multipart/form-data">
<input type="file" multiple="multiple" name="fileUpload">
<input type="button" id="upload" value="upload"
onclick="google.script.run.logForm(document.getElementById('uploadTest'));">
</form>
</html>
日志视图:
{"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}}
https://stackoverflow.com/questions/15726439
复制相似问题