WPS上传Excel,无法过laravel验证问题

验证mimetypes规则地址:https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types

通常情况下 

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet	xlsx
application/vnd.ms-excel			xls xlm xla xlc xlt xlw

但是WAP的Excel文件会转换成

application/octet-stream	bin dms lrf mar so dist distz pkg bpk dump elc deploy

mimetypes 和 mimes 并不是验证的后缀,而是验证的 http header 中的 Content-Type 。

发布了14 篇原创文章 · 获赞 21 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/wanghongbiao1993/article/details/82225519