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
    来源:简书
    著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

  • 相关阅读:
    利用windows 127.0.0.1:30000 代理在linux下工作
    nginx与ssh 把内网转为公网开发服务器
    php errorlog 记录
    dockerfile php 开发
    ubuntu
    k8s 1.9.1 centos7 install 离线安装
    kubernetes
    linux字符设备驱动--基本知识介绍
    linux应用程序设计--Makefile工程管理
    linux应用程序设计--GDB调试
  • 原文地址:https://www.cnblogs.com/qqhfeng/p/14227535.html
Copyright © 2011-2022 走看看