例:

<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
*.pdf 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 类型列表的更多相关文章

  1. ie8及其以下版本兼容性问题之input file隐藏上传文件

    文件上传时,默认的file标签很难看,而且每个浏览器下都有很大差距.因此我们基本都把真正的file标签给隐藏,然后创建一个标签来替代它.但是由于IE出于安全方面的考虑上传文件时必须点击file的浏览按 ...

  2. input file限制上传文件类型

    http://www.cnblogs.com/haocool/p/3431181.html http://www.haorooms.com/post/input_file_leixing http:/ ...

  3. php 下 html5 XHR2 + FormData + File API 上传文件

    FormData的作用: FormData对象可以帮助我们自动的打包表单数据,通过XMLHttpRequest的send()方法来提交表单.当然FormData也可以动态的append数据.FormD ...

  4. input type='file'限制上传文件类型

    前端与后台数据进行对接时,就避免不了要使用ajax进行http请求,常用的请求就两个post与get:然而常见的post请求的需求是文件上传,可能我一说到文件上传大家都觉得so  easy啊,没什么嘛 ...

  5. input type file onchange上传文件的过程中,遇到同一个文件二次上传无效的问题。

    不要采用删除当前input[type=file]这个节点,然后再重新创建dom这种方案,这样是不合理的.解释如下:input[type=file]使用的是onchange去做,onchange监听的为 ...

  6. input[type='file']获取上传文件路径案例

    最近在项目时,需要获取用户的上传文件的路径,便写了一个demo: <body> <input type="file" name="" valu ...

  7. input type file onchange上传文件的过程中,同一个文件二次上传无效的问题。

    不要采用删除当前input[type=file]这个节点,然后再重新创建dom这种方案,这样是不合理的.解释如下:input[type=file]使用的是onchange去做,onchange监听的为 ...

  8. input file 图片上传

    使用第三方:jquery.ajaxfileupload.jsinput中的name根据后端来定 <form method="post" enctype="multi ...

  9. SSH Secure File Transfer上传文件错误:encountered 1 errors during the transfer解决办法

    在使用SSH 工具向Linux服务器上传文件时,弹出 encountered 1 errors during the transfer 错误. 解决方案: 1.准备上传的那个文件所在目录路径存在(), ...

随机推荐

  1. uni-app

    1 路由的跳转 uni.navigateTo({ url:'/pages/home/search' }); //非tabBar页面跳转 uni.switchTab({ url:"/pages ...

  2. jQuery实现动态分割div

    转自:https://www.cnblogs.com/herd/p/6014848.html 演示地址:http://www.vfkjsd.cn/div/2/div.html

  3. pythone函数基础(15)接口开发初识

    导入需要的第三方模块 import flaskimport toolsimport json,redisimport random server = flask.Flask(__name__)#新建一 ...

  4. VBA解析Json(转)

    Sub bluejson() 'ok Dim aa Set x = CreateObject("ScriptControl"): x.Language = "JScrip ...

  5. Clinet/Server在工作线程中刷新页面数据的方法

    Worker线程不能修改UI线程的状态(比如文本框里面的内容).解决的办法是写一个用来更新文本框内容的函数,然后在Worker线程里面通过BeginInvoke来利用delegate调用这个函数更新文 ...

  6. 一些简单的ajax的特点,方法、属性。以及ajax的创建 请求

    1.ajax的特点,基本原理,属性. ajax:页面的局部刷新 Asynchronous JavaScript And Xml JavaScript:更新局部的页面 XML:一般用于请求数据和响应数据 ...

  7. java scala jdk+sdk

    编译报错: Error:scalac: Error: org.jetbrains.jps.incremental.scala.remote.ServerException Error compilin ...

  8. 【Selenium】【BugList10】smtp发送邮件问题汇总:550/535/554

    [场景] 通过126邮箱向QQ邮箱发送HTML格式邮件 [代码1] from email.mime.text import MIMEText from email.header import Head ...

  9. idea启动springboot+jsp项目出现404

    场景:用IntelliJ IDEA 启动 springBoot项目访问出现404,很皮,因为我用eclipse开发时都是正常的,找了很久,什么加注释掉<scope>provided< ...

  10. new Image().src资源重复请求问题

    const img = new Image(); img.setAttribute("crossOrigin", 'Anonymous'); img.src = url + '?t ...