问题原因:现象:个别电脑无法上传文件,file.type 为 空 ,导致上传文件被js拦截
原因:系统注册表中没有对应文件类型(可能为安装系统本身没有,或者可能被 wps 篡改 <网络上有人说的>)
解决方案:手动添加加缺失的注册表
win + R 打开 运行 ;输入 regedit 进入注册表 ,在 HKEY_CLASSES_ROOT 文件下 找到对应 文件扩展名 项目 新建 Content Type 文件,将对应的数值数据(文件类型)填写,如果没有Content Type的话右键新建字符串值。
(博主是docx文件类型丢失导致问题的发生,各位看官可修改自己与之对应的,方法是一样的)

Input Accept 接收各种类型文档
.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
.xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
.potx application/vnd.openxmlformats-officedocument.presentationml.template
.ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
.pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
.sldx application/vnd.openxmlformats-officedocument.presentationml.slide
.docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
.dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
.xlsm application/vnd.ms-excel.addin.macroEnabled.12
.xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12