html input file accept 上传文件类型限制格式 MIME 类型列表
例:
<input type="file" accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" (change)="change($event)" multiple="false" class="ml-sm" />
| File extension | File type | MIME type | 
|---|---|---|
| 
 .docx  | 
 Microsoft Office Word 2007 document  | 
 application/vnd.openxmlformats-officedocument.wordprocessingml.document  | 
| 
 .docm  | 
 Office Word 2007 macro-enabled document  | 
 application/vnd.ms-word.document.macroEnabled.12  | 
| 
 .dotx  | 
 Office Word 2007 template  | 
 application/vnd.openxmlformats-officedocument.wordprocessingml.template  | 
| 
 .dotm  | 
 Office Word 2007 macro-enabled document template  | 
 application/vnd.ms-word.template.macroEnabled.12  | 
| 
 .xlsx  | 
 Microsoft Office Excel 2007 workbook  | 
 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet  | 
| 
 .xlsm  | 
 Office Excel 2007 macro-enabled workbook  | 
 application/vnd.ms-excel.sheet.macroEnabled.12  | 
| 
 .xltx  | 
 Office Excel 2007 template  | 
 application/vnd.openxmlformats-officedocument.spreadsheetml.template  | 
| 
 .xltm  | 
 Office Excel 2007 macro-enabled workbook template  | 
 application/vnd.ms-excel.template.macroEnabled.12  | 
| 
 .xlsb  | 
 Office Excel 2007 binary workbook  | 
 application/vnd.ms-excel.sheet.binary.macroEnabled.12  | 
| 
 .xlam  | 
 Office Excel 2007 add-in  | 
 application/vnd.ms-excel.addin.macroEnabled.12  | 
| 
 .pptx  | 
 Microsoft Office PowerPoint 2007 presentation  | 
 application/vnd.openxmlformats-officedocument.presentationml.presentation  | 
| 
 .pptm  | 
 Office PowerPoint 2007 macro-enabled presentation  | 
 application/vnd.ms-powerpoint.presentation.macroEnabled.12  | 
| 
 .ppsx  | 
 Office PowerPoint 2007 slide show  | 
 application/vnd.openxmlformats-officedocument.presentationml.slideshow  | 
| 
 .ppsm  | 
 Office PowerPoint 2007 macro-enabled slide show  | 
 application/vnd.ms-powerpoint.slideshow.macroEnabled.12  | 
| 
 .potx  | 
 Office PowerPoint 2007 template  | 
 application/vnd.openxmlformats-officedocument.presentationml.template  | 
| 
 .potm  | 
 Office PowerPoint 2007 macro-enabled presentation template  | 
 application/vnd.ms-powerpoint.template.macroEnabled.12  | 
| 
 .ppam  | 
 Office PowerPoint 2007 add-in  | 
 application/vnd.ms-powerpoint.addin.macroEnabled.12  | 
| 
 .sldx  | 
 Office PowerPoint 2007 slide  | 
 application/vnd.openxmlformats-officedocument.presentationml.slide  | 
| 
 .sldm  | 
 Office PowerPoint 2007 macro-enabled slide  | 
 application/vnd.ms-powerpoint.slide.macroEnabled.12  | 
| 
 .one  | 
 Microsoft Office OneNote 2007 section  | 
 application/msonenote  | 
| 
 .onetoc2  | 
 Office OneNote 2007 TOC  | 
 application/msonenote  | 
| 
 .onetmp  | 
 Office OneNote 2007 temporary file  | 
 application/msonenote  | 
| 
 .onepkg  | 
 Office OneNote 2007 package  | 
 application/msonenote  | 
| 
 .thmx  | 
 2007 Office system release theme  | 
 application/vnd.ms-officetheme  | 
| *.3gpp | audio/3gpp, video/3gpp | 3GPP Audio/Video | 
| *.ac3 | audio/ac3 | AC3 Audio | 
| *.asf | allpication/vnd.ms-asf | Advanced Streaming Format | 
| *.au | audio/basic | AU Audio | 
| *.css | text/css | Cascading Style Sheets | 
| *.csv | text/csv | Comma Separated Values | 
| *.doc | application/msword | MS Word Document | 
| *.dot | application/msword | MS Word Template | 
| *.dtd | application/xml-dtd | Document Type Definition | 
| *.dwg | image/vnd.dwg | AutoCAD Drawing Database | 
| *.dxf | image/vnd.dxf | AutoCAD Drawing Interchange Format | 
| *.gif | image/gif | Graphic Interchange Format | 
| *.htm | text/html | HyperText Markup Language | 
| *.html | text/html | HyperText Markup Language | 
| *.jp2 | image/jp2 | JPEG-2000 | 
| *.jpe | image/jpeg | JPEG | 
| *.jpeg | image/jpeg | JPEG | 
| *.jpg | image/jpeg | JPEG | 
| *.js | text/javascript, application/javascript | JavaScript | 
| *.json | application/json | JavaScript Object Notation | 
| *.mp2 | audio/mpeg, video/mpeg | MPEG Audio/Video Stream, Layer II | 
| *.mp3 | audio/mpeg | MPEG Audio Stream, Layer III | 
| *.mp4 | audio/mp4, video/mp4 | MPEG-4 Audio/Video | 
| *.mpeg | video/mpeg | MPEG Video Stream, Layer II | 
| *.mpg | video/mpeg | MPEG Video Stream, Layer II | 
| *.mpp | application/vnd.ms-project | MS Project Project | 
| *.ogg | application/ogg, audio/ogg | Ogg Vorbis | 
| application/pdf | Portable Document Format | |
| *.png | image/png | Portable Network Graphics | 
| *.pot | application/vnd.ms-powerpoint | MS PowerPoint Template | 
| *.pps | application/vnd.ms-powerpoint | MS PowerPoint Slideshow | 
| *.ppt | application/vnd.ms-powerpoint | MS PowerPoint Presentation | 
| *.rtf | application/rtf, text/rtf | Rich Text Format | 
| *.svf | image/vnd.svf | Simple Vector Format | 
| *.tif | image/tiff | Tagged Image Format File | 
| *.tiff | image/tiff | Tagged Image Format File | 
| *.txt | text/plain | Plain Text | 
| *.wdb | application/vnd.ms-works | MS Works Database | 
| *.wps | application/vnd.ms-works | Works Text Document | 
| *.xhtml | application/xhtml+xml | Extensible HyperText Markup Language | 
| *.xlc | application/vnd.ms-excel | MS Excel Chart | 
| *.xlm | application/vnd.ms-excel | MS Excel Macro | 
| *.xls | application/vnd.ms-excel | MS Excel Spreadsheet | 
| *.xlt | application/vnd.ms-excel | MS Excel Template | 
| *.xlw | application/vnd.ms-excel | MS Excel Workspace | 
| *.xml | text/xml, application/xml | Extensible Markup Language | 
| *.zip | aplication/zip | Compressed Archive | 
html input file accept 上传文件类型限制格式 MIME 类型列表的更多相关文章
- ie8及其以下版本兼容性问题之input file隐藏上传文件
		
文件上传时,默认的file标签很难看,而且每个浏览器下都有很大差距.因此我们基本都把真正的file标签给隐藏,然后创建一个标签来替代它.但是由于IE出于安全方面的考虑上传文件时必须点击file的浏览按 ...
 - input file限制上传文件类型
		
http://www.cnblogs.com/haocool/p/3431181.html http://www.haorooms.com/post/input_file_leixing http:/ ...
 - php 下 html5 XHR2 + FormData + File API 上传文件
		
FormData的作用: FormData对象可以帮助我们自动的打包表单数据,通过XMLHttpRequest的send()方法来提交表单.当然FormData也可以动态的append数据.FormD ...
 - input type='file'限制上传文件类型
		
前端与后台数据进行对接时,就避免不了要使用ajax进行http请求,常用的请求就两个post与get:然而常见的post请求的需求是文件上传,可能我一说到文件上传大家都觉得so easy啊,没什么嘛 ...
 - input type file onchange上传文件的过程中,遇到同一个文件二次上传无效的问题。
		
不要采用删除当前input[type=file]这个节点,然后再重新创建dom这种方案,这样是不合理的.解释如下:input[type=file]使用的是onchange去做,onchange监听的为 ...
 - input[type='file']获取上传文件路径案例
		
最近在项目时,需要获取用户的上传文件的路径,便写了一个demo: <body> <input type="file" name="" valu ...
 - input type file onchange上传文件的过程中,同一个文件二次上传无效的问题。
		
不要采用删除当前input[type=file]这个节点,然后再重新创建dom这种方案,这样是不合理的.解释如下:input[type=file]使用的是onchange去做,onchange监听的为 ...
 - input file 图片上传
		
使用第三方:jquery.ajaxfileupload.jsinput中的name根据后端来定 <form method="post" enctype="multi ...
 - SSH Secure File Transfer上传文件错误:encountered 1 errors during the transfer解决办法
		
在使用SSH 工具向Linux服务器上传文件时,弹出 encountered 1 errors during the transfer 错误. 解决方案: 1.准备上传的那个文件所在目录路径存在(), ...
 
随机推荐
- python的re模块详解
			
一.正则表达式的特殊字符介绍 正则表达式 ^ 匹配行首 $ 匹配行尾 . 任意单个字符 [] 匹配包含在中括号中的任意字符 [^] 匹配包含在中括号中的字符之外的字符 [-] 匹配指定范围的任意单个字 ...
 - js 内置对象参考 (Array,String, Math, Data, Number)
			
var str = "helloWorld"; var strOne = "helloWorld"; // charAt() 返回在指定位置的字符. var a ...
 - Mysql InnoDB下的两种行锁
			
今天例举2种常见的Mysql InnoDB下的行锁 现有表dr_test(id pk, name) 数据是 1 zhangsan2 lisi3 wangwu 例子1 事务1 update dr_tes ...
 - NC 数据库操作
			
一.后台数据库操作方法(private端): 1.以下为后台查询方法 BaseDAO dao = new BaseDAO();//只能在private端使用 String querySql=" ...
 - Python学习:经典编程例题
			
九九乘法表 ,): ,i+): print(i,'*',j,'=',i*j,end='\t') print() 水仙花数问题描述:100-999之间每个数的立方相加等于原数例如:153=1 ^ 3 + ...
 - HTTP协议快速入门指南
			
看完下面的文章,回答这几个问题 常用的HTTP方法有哪些 GET方法与POST方法的区别 HTTP请求报文与响应报文格式 常见的HTTP相应状态码 HTTP1.1版本新特性 常见HTTP首部字段 HT ...
 - Linux学习笔记:Jenkins的使用(二)
			
一些插件的使用 Deploy to container Plugin jenkins安装完成之后,添加插件 Deploy to container Plugin ,这个插件可以将打好的war包部署到t ...
 - node.js 使用 superagent 与 cheerio 完成简单爬虫
			
目标 建立一个 lesson3 项目,在其中编写代码. 当在浏览器中访问 http://localhost:3000/ 时,输出 CNode(https://cnodejs.org/ ) 社区首页的所 ...
 - 小程序跳转tabbar页面
			
如果在app.json 配置tabbar 的时候配置了 跳转的页面的链接: 在其余的子页面,设置用navigator 进行跳转会发现 在tabbar 设置过的页面无法进行跳转,这时需要在navigat ...
 - Java中如何创建一个新的对象的/Creating Objects/
			
The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't ...