zoukankan      html  css  js  c++  java
  • office文件所对应的的 Content-type类型Content-type类型总结

    最近做文件下载因为涉及到不同类型的文件,所以重新查阅了一下文件所对应的的content-type类型,好记性不如烂笔头,记录一下。

    文件后缀MIME TYPE
    .doc application/msword
    .dot application/msword
    .docx

    application/vnd.openxmlformats-officedocument.wordprocessingml.document

    .dotx application/vnd.openxmlformats-officedocument.wordprocessingml.template
    .docm application/vnd.ms-word.document.macroEnabled.12
    .dotm application/vnd.ms-word.template.macroEnabled.12
    .xls application/vnd.ms-excel
    .xlt application/vnd.ms-excel
    .xla application/vnd.ms-excel
    .xlsx

    application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

    如果还是用application/vnd.ms-excel 谷歌和ie都不改名,识别未xlsx

    但是火狐会自动改名未 xls 文件

    xlsx请使用这个新版的

    .xltx application/vnd.openxmlformats-officedocument.spreadsheetml.template
    .xlsm application/vnd.ms-excel.sheet.macroEnabled.12
    .xltm application/vnd.ms-excel.template.macroEnabled.12
    .xlam application/vnd.ms-excel.addin.macroEnabled.12
    .xlsb application/vnd.ms-excel.sheet.binary.macroEnabled.12
    .ppt application/vnd.ms-powerpoint
    .pot application/vnd.ms-powerpoint
    .pps application/vnd.ms-powerpoint
    .ppa application/vnd.ms-powerpoint
    .pptx application/vnd.openxmlformats-officedocument.presentationml.presentation
    .potx application/vnd.openxmlformats-officedocument.presentationml.template
    .ppsx application/vnd.openxmlformats-officedocument.presentationml.slideshow
    .ppam application/vnd.ms-powerpoint.addin.macroEnabled.12
    .pptm application/vnd.ms-powerpoint.presentation.macroEnabled.12
    .potm application/vnd.ms-powerpoint.presentation.macroEnabled.12
    .ppsm application/vnd.ms-powerpoint.slideshow.macroEnabled.12
    .zip application/zip
    .tar application/x-tar

    以上总结参考来源(https://blog.csdn.net/xiaoranzhizhu/article/details/70473734)

    接下来再补充一下基础知识



    作者:木子方是个小太阳
    链接:https://www.jianshu.com/p/4b09c260f9b2
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

  • 相关阅读:
    JAVA中SpringMVC获取bean方法,在工具类(utils)注入service
    JAVA中json对象转JAVA对象,JSON数组(JSONArray)转集合(List)
    maven中pom文件中scope的作用
    页面图片懒加载、延迟加载(lazyload)
    js(jQuery)获取自定义data属性的值
    ubantu使用小结
    ipmitool管理工具
    大于2T的硬盘怎么分区
    lamp的动静分离部署
    keepalived脑裂问题
  • 原文地址:https://www.cnblogs.com/qqhfeng/p/14227535.html
Copyright © 2011-2022 走看看