laravle5.1 如何validate apk文件

WBOY
Release: 2016-06-06 20:20:36
Original
1384 people have browsed it

通过表单上传apk文件,要在controller中验证文件是否为apk,但是如 mimes:apk,jar都不行,也尝试了mimes:application/vnd.android.package-archive这样的写法,也是不行。尝试找判断类型的文件也没找到。。。。请高人指点。

回复内容:

通过表单上传apk文件,要在controller中验证文件是否为apk,但是如 mimes:apk,jar都不行,也尝试了mimes:application/vnd.android.package-archive这样的写法,也是不行。尝试找判断类型的文件也没找到。。。。请高人指点。

前端JS 验证 和 后端后缀名验证 ...

参见 http://api.symfony.com/3.0/Symfony/Component/HttpFoundation/File/UploadedFile.html

Laravel 的 上传组件是直接用的这个的哦 . 对象属性和方法 完全一致

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template