文件上传input type=“file“之accept接受的类型汇总"/>
文件上传input type=“file“之accept接受的类型汇总
<input>标签
规定了用户可以在其中输入数据的输入字段。 <input> 元素在 <form> 元素中使用,用来声明允许用户输入数据的 input 控件。 输入字段可通过多种方式改变,取决于 type 属性。
<input> type 属性
type 属性规定要显示的 <input> 元素的类型。
<input> accept 属性
accept 属性规定了可通过文件上传提交的服务器接受的文件类型。
注意:accept 属性仅适用于 <input type="file">
提示:请不要将该属性作为您的验证工具。应该在服务器上对文件上传进行验证。
<input type="file" @change="getVod($event)" accept="audio/mp4, video/mp4">
类型:
.3gpp | audio/3gpp, video/3gpp |
.ac3 | audio/ac3 |
.asf | allpication/vnd.ms-asf |
.au | audio/basic |
.css | text/css |
.csv | text/csv |
.doc | application/msword |
.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
.dot | application/msword |
.dotx | application/vnd.openxmlformats-officedocument.wordprocessingml.template |
.docm | application/vnd.ms-word.document.macroEnabled.12 |
.dotm | application/vnd.ms-word.template.macroEnabled.12 |
.dtd | application/xml-dtd |
.dwg | image/vnd.dwg |
.dxf | image/vnd.dxf |
.gif | image/gif |
.htm | text/html |
.html | text/html |
.jp2 | image/jp2 |
.jpe | image/jpeg |
.jpeg | image/jpeg |
.jpg | image/jpeg |
.js | text/javascript, application/javascript |
.json | application/json |
.mp2 | audio/mpeg, video/mpeg |
.mp3 | audio/mpeg |
.mp4 | audio/mp4, video/mp4 |
.mpeg | video/mpeg |
.mpg | video/mpeg |
.mpp | application/vnd.ms-project |
.ogg | application/ogg, audio/ogg |
application/pdf | |
.png | image/png |
.pot | application/vnd.ms-powerpoint |
.potm | application/vnd.ms-powerpoint.presentation.macroEnabled.12 |
.potx | application/vnd.openxmlformats-officedocument.presentationml.template |
.pps | application/vnd.ms-powerpoint |
.ppsm | application/vnd.ms-powerpoint.slideshow.macroEnabled.12 |
.ppsx | application/vnd.openxmlformats-officedocument.presentationml.slideshow |
.ppt | application/vnd.ms-powerpoint |
.pptm | application/vnd.ms-powerpoint.presentation.macroEnabled.12 |
.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation |
.ppa | application/vnd.ms-powerpoint |
.ppam | application/vnd.ms-powerpoint.addin.macroEnabled.12 |
.rtf | application/rtf, text/rtf |
.svf | image/vnd.svf |
.tif | image/tiff |
.tiff | image/tiff |
.txt | text/plain |
.wdb | application/vnd.ms-works |
.wps | application/vnd.ms-works |
.xhtml | application/xhtml+xml |
.xlc | application/vnd.ms-excel |
.xlm | application/vnd.ms-excel |
.xla | application/vnd.ms-excel |
.xlam | application/vnd.ms-excel.addin.macroEnabled.12 |
.xls | application/vnd.ms-excel |
.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
.xlsm | application/vnd.ms-excel.sheet.macroEnabled.12 |
.xlsb | application/vnd.ms-excel.sheet.binary.macroEnabled.12 |
.xlt | application/vnd.ms-excel |
.xltx | application/vnd.openxmlformats-officedocument.spreadsheetml.template |
.xltm | application/vnd.ms-excel.template.macroEnabled.12 |
.xlw | application/vnd.ms-excel |
.xml | text/xml, application/xml |
.zip | application/zipapplication/x-zip-compressed |
更多推荐
文件上传input type=“file“之accept接受的类型汇总
发布评论