文件上传和传输中,
<input type="file" id="input" accept=".doc,.docx,application/msword,application/zip">
accept定义了文件 input 应该接受的文件类型。这个字符串是一个以逗号为分隔的 唯一文件类型说明符 列表。
通过 File API,我们可以访问 FileList,它包含了表示用户所选文件的 File 对象
file对象
https://developer.mozilla.org/zh-CN/docs/Web/API/File
多用途互联网邮件扩展类型(MIME Type)
https://www.iana.org/assignments/media-types/media-types.xhtml