我试图做一个表单的服务器端验证与文件附件。我想不出正确的语法得到该文件的大小。我努力了:
form.myFile.files[0].size;
form.myFile.file.size;
form.myFile.getSize();
form.myFile.getName(); // this works and does return the name of the file.
<input type="file" id="myFile">
Then, on the *.gs page - doGet() - then pulls in the form.
有任何想法吗?非常感谢!!!
form.myFile.length; // that worked!