首页 > 其他分享 >上传文件类型

上传文件类型

时间:2022-10-04 17:12:12浏览次数:70  
标签:vnd text application video plain 文件类型 audio 上传

https://blog.csdn.net/qq_33413264/article/details/77506468

 final String[][] MIME_MapTable={   
            //{后缀名,MIME类型}   
            {".3gp",    "video/3gpp"},   
            {".apk",    "application/vnd.android.package-archive"},   
            {".asf",    "video/x-ms-asf"},   
            {".avi",    "video/x-msvideo"},   
            {".bin",    "application/octet-stream"},   
            {".bmp",    "image/bmp"},   
            {".c",  "text/plain"},   
            {".class",  "application/octet-stream"},   
            {".conf",   "text/plain"},   
            {".cpp",    "text/plain"},   
            {".doc",    "application/msword"},   
            {".docx",   "application/vnd.openxmlformats-officedocument.wordprocessingml.document"},   
            {".xls",    "application/vnd.ms-excel"},    
            {".xlsx",   "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"},   
            {".exe",    "application/octet-stream"},   
            {".gif",    "image/gif"},   
            {".gtar",   "application/x-gtar"},   
            {".gz", "application/x-gzip"},   
            {".h",  "text/plain"},   
            {".htm",    "text/html"},   
            {".html",   "text/html"},   
            {".jar",    "application/java-archive"},   
            {".java",   "text/plain"},   
            {".jpeg",   "image/jpeg"},   
            {".jpg",    "image/jpeg"},   
            {".js", "application/x-javascript"},   
            {".log",    "text/plain"},   
            {".m3u",    "audio/x-mpegurl"},   
            {".m4a",    "audio/mp4a-latm"},   
            {".m4b",    "audio/mp4a-latm"},   
            {".m4p",    "audio/mp4a-latm"},   
            {".m4u",    "video/vnd.mpegurl"},   
            {".m4v",    "video/x-m4v"},    
            {".mov",    "video/quicktime"},   
            {".mp2",    "audio/x-mpeg"},   
            {".mp3",    "audio/x-mpeg"},   
            {".mp4",    "video/mp4"},   
            {".mpc",    "application/vnd.mpohun.certificate"},          
            {".mpe",    "video/mpeg"},     
            {".mpeg",   "video/mpeg"},     
            {".mpg",    "video/mpeg"},     
            {".mpg4",   "video/mp4"},      
            {".mpga",   "audio/mpeg"},   
            {".msg",    "application/vnd.ms-outlook"},   
            {".ogg",    "audio/ogg"},   
            {".pdf",    "application/pdf"},   
            {".png",    "image/png"},   
            {".pps",    "application/vnd.ms-powerpoint"},   
            {".ppt",    "application/vnd.ms-powerpoint"},   
            {".pptx",   "application/vnd.openxmlformats-officedocument.presentationml.presentation"},   
            {".prop",   "text/plain"},   
            {".rc", "text/plain"},   
            {".rmvb",   "audio/x-pn-realaudio"},   
            {".rtf",    "application/rtf"},   
            {".sh", "text/plain"},   
            {".tar",    "application/x-tar"},      
            {".tgz",    "application/x-compressed"},    
            {".txt",    "text/plain"},   
            {".wav",    "audio/x-wav"},   
            {".wma",    "audio/x-ms-wma"},   
            {".wmv",    "audio/x-ms-wmv"},   
            {".wps",    "application/vnd.ms-works"},   
            {".xml",    "text/plain"},   
            {".z",  "application/x-compress"},   
            {".zip",    "application/x-zip-compressed"},   
            {"",        "*/*"}     
        };   

https://blog.csdn.net/z591102/article/details/124426036

js获取文件的后缀名
const h = file.name.substring(file.name.lastIndexOf('.') + 1)

标签:vnd,text,application,video,plain,文件类型,audio,上传
From: https://www.cnblogs.com/linhan8888/p/16754054.html

相关文章

  • 图片上传
    $('#file').on('change',function(){//当用户选择文件时varfile=this.files[0];//创建formData对象varformData=newFormData();//将用户......
  • Vue Quill富文本自定义上传音频/视频
    有时候项目中可能需要在富文本中上传音频,所以...环境Asp.NetCore文件上传服务(本文不提供/框架很多)Vue2.0功能自定义图片上传自定义视频上传自定义......
  • springboot整合thymeleaf模板引擎和bootstrap实现增删改查和文件上传
     一、参照第八天任务中的栏目表,使用thymeleaf做为前端展现,完成CRUD及分页操作二、使用springboot+mybatis-plus+redis完成用户登录系统,数据库表users字段名称......
  • 在项目中全局配置 TypeScript 文件类型声明
    全局配置ts文件类型声明-产生的原因有些时候,某几个类型声明在项目中很多次都在使用。我们可以将它抽取成为一个文件。1.可以将这个文件中的类型声明成为全局的。2.在需......
  • el-upload上传多张图片可预览 压缩
    原文链接:https://blog.csdn.net/qq_45331969/article/details/124835563项目里面涉及图片上传的功能,要图片可以预览,上传的时候图片大了要做压缩图片上传以及预览<Form-ite......
  • 上传本地md到博客园
    环境安装参考链接:https://www.cnblogs.com/gered/p/14736136.html1、安装python环境安装python3:https://blog.csdn.net/weixin_40844416/article/details/80889165......
  • 多容器部署django项目 上传图片出现 [Errno 13] Permission denied: ‘/var/www/mysit
    @目录问题原因解决办法一、进入容器添加权限二、在Dockerfile文件中添加上代码,重新生成镜像并启动容器问题原因首先,这是用docker多容器部署django项目的情况下发现的一个......
  • odoo 上传的文件怎样保存
    路由@http.route('/web/binary/upload_attachment',type='http',auth="user")@serialize_exceptiondefupload_attachment(self,callback,model,id,ufile):......
  • Spring MVC入门(八):文件上传下载
    文件上传下载导入文件上传所需的依赖<dependency><groupId>commons-fileupload</groupId><artifactId>commons-fileupload</artifactId><version>1.3.1</versio......
  • 文件上传下载
    案例一demo为​​chnx/springboot/file-demo​​​​项目地址​​​​参考​​启动项目访问文件上传下载页面选择文件并上传后台打印出文件上传后的目录复制目录并查看文件......