String originalFilename = mf.getOriginalFilename();//获取文件的原名称 String suffix = originalFilename.substring(originalFilename.lastIndexOf(".") + 1); if (!suffixList.contains(suffix)) {//格式限制,非jpg或者png格式的不上传 continue; } mf.transferTo(new File(path +originalFilename)); }...
public static void msOfficeToPdf(String wordFile, String pdfFile) { wordToPdf(wordFile, pdfFile, MS_OFFICE_APPLICATION); } /** * WPS Office Word转PDF * @param wordFile Word文件 * @param pdfFile Pdf文件 */ public static void wpsOfficeToPdf(String wordFile, String pdfFile) { wordToPdf(...
".dll"="application/x-msdownload" ".doc"="application/msword" ".dot"="application/msword" ".drw"="application/x-drw" ".dtd"="text/xml" ".dwf"="Model/vnd.dwf" ".dwf"="application/x-dwf" ".dwg"="application/x-dwg" ".dxb"="application/x-dxb" ".dxf"="application/x-dxf" "....
文件扩展名Content-Type(Mime-Type)文件扩展名Content-Type(Mime-Type).*( 二进制流,不知道下载文件类型)application/octet-stream.tifimage/tiff.001application/x-001...
// 下载excelexportfunctiontriggerDownloadExcel(res,fileName){//.xlsx// const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8' })constblob=newBlob([res.data],{type:'application/vnd.ms-excel;charset=utf-8'})constdownloadEle...
{".doc", "application/msword"}, {".docm", "application/vnd.ms-word.document.macroEnabled.12"}, {".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"}, {".dot", "application/msword"}, {".dotm", "application/vnd.ms-word.template.macroEnabled.12"}, ...
mximage/x-cmxcodimage/cis-codcpioapplication/x-cpiocrd应用程序/x-mscardfilecrl应用程序/pkix-crlcrt应用程序/x-x509-ca-certcsh应用程序/x- cshcss文本/cssdcr应用程序/x-directorder应用程序/x-x509-ca-certdir应用程序/x-directordll应用程序/x-msdownloaddms应用程序/octet-streamdo c应用程序/msworddot...
各种文件的ContentType 各种⽂件的ContentType CONTENT_TYPE = { 16 '.load': 'text/html',17 '.123': 'application/vnd.lotus-1-2-3',18 '.3ds': 'image/x-3ds',19 '.3g2': 'video/3gpp',20 '.3ga': 'video/3gpp',21 '.3gp': 'video/3gpp',22 '.3gpp': '...
HTTP Content-Type的类型如下: 15 CONTENT_TYPE = { 16 '.load': 'text/html', 17 '.123': 'application/vnd.lotus-1-2-3', 18 '.3ds': 'image/x-3ds', 19 '.3g2': 'video/3gpp', 20 '.3ga': 'video/3gpp', 21 '.3gp': 'video/3gpp', 22 '.3gpp': 'video/3gpp', 23 '.602'...
MICROSOFT WORD document <% response.ContentType =”application/msword” %> <!–#i nclude virtual=”/myfile.doc” –> RTF document <% response.ContentType =”application/rtf” %> <!–#i nclude virtual=”/myfile.rtf” –> MICROSOFT EXCEL document ...