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.准备上传的那个文件所在目录路径存在(), ...
随机推荐
- easyui的datagrid改变整行颜色
easyui的datagrid改变单元格颜色方法1:https://www.cnblogs.com/raitorei/p/10395233.html easyui的datagrid改变单元格颜色方法2 ...
- swift 粒子效果
1. override func viewDidLoad() { super.viewDidLoad() let rect = CGRect(x: 0.0, y: -70.0, width: view ...
- Kubernetes helm配置国内镜像源
1.删除默认的源 helm repo remove stable 2.增加新的国内镜像源 helm repo add stable https://burdenbear.github.io/kube- ...
- 在Linux 安装Python3.5.6详细文档!!!!
在Linux 安装Python3.5.6详细文档!!!! 1.安装相关依赖库(工具包) yum install gcc patch libffi-devel python-devel zlib-de ...
- JAVA多线程之线程间的通信方式
(转发) 收藏 记 周日,北京的天阳光明媚,9月,北京的秋格外肃穆透彻,望望窗外的湛蓝的天,心似透过栏杆,沐浴在这透亮清澈的蓝天里,那朵朵白云如同一朵棉絮,心意畅想....思绪外扬, 鱼和熊掌不可兼得 ...
- VUEX报 “was assigned to but it has no setter”
如果有当前的变量(VUEX声名的)会发生改变的(change),刚绑定的值需要在data () 内进行声明 一个新的变量进行处理.
- Angular中不同的组件间传值与通信的方法
主要分为父子组件和非父子组件部分. 父子组件间参数与通讯方法 使用事件通信(EventEmitter,@Output): 场景:可以在父子组件之间进行通信,一般使用在子组件传递消息给父组件: 步骤: ...
- java 判断null和空
判断null和空 org.apache.commons.lang3 if(StringUtils.isBlank(valuationMeasureUnitName)){ }
- 快速解决PL/SQL Developer过期问题(无需注册码等复杂操作)
第一步:在开始菜单中输入 :regedit 的指令,点击回车,进入注册表编辑器界面 第二步:在注册表里按HKEY_CURRENT_USER\Software\Allround Automations ...
- [ES]elasticsearch章5 ES的分词(一)
初次接触 Elasticsearch 的同学经常会遇到分词相关的难题,比如如下这些场景: 1.为什么明明有包含搜索关键词的文档,但结果里面就没有相关文档呢? 2.我存进去的文档到底被分成哪些词(ter ...