|
文件流下载转Blob时类型匹配,例如:- let blob = new Blob([data], {type: 'audio/mpeg'});
复制代码 Blob配置类型如下表所示,详细介绍
后缀名文件类型类型(type).xlsMicrosoft Excelapplication/vnd.ms-excel.xlsxMicrosoft Excel (OpenXML)application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.csvCSVtext/csv.docMicrosoft Wordapplication/msword.docxMicrosoft Word (OpenXML)application/vnd.openxmlformats-officedocument.wordprocessingml.document.pdfPDFapplication/pdf.pptMicrosoft PowerPointapplication/vnd.ms-powerpoint.pptxMicrosoft PowerPoint (OpenXML)application/vnd.openxmlformats-officedocument.presentationml.presentation.png便携式网络图形(PNG)image/png.gifGIFimage/gif.jpegJPEG 图片image/jpeg.jpgJPEG 图片image/jpeg.mp3MP3 音频audio/mpeg.aacAAC 音频audio/aac.html超文本标记语言 (HTML)text/html.cssCSStext/css.jsJavaScripttext/javascript.jsonJSON 格式application/json.abwAbiWord 文档application/x-abiword.arc存档文档(多个文件嵌入)application/x-freearc.aviAVI: 音频视频交错video/x-msvideo.azw亚马逊Kindle电子书格式application/vnd.amazon.ebook.bin任何类型的二进制数据application/octet-stream.bmpWindows OS/2位图图形image/bmp.bzBZip 存档application/x-bzip.bz2BZip2 存档application/x-bzip2.cshC-Shell 脚本application/x-csh.eotMS嵌入式OpenType字体application/vnd.ms-fontobject.epub电子出版物(EPUB)application/epub+zip.htm超文本标记语言 (HTML)text/html.icoIcon 格式image/vnd.microsoft.icon.icsiCalendar 格式text/calendar.jarJava Archive (JAR)application/java-archive.jsonldJSON-LD 格式application/ld+json.mid乐器数字接口(MIDI)audio/midi audio/x-midi.midi乐器数字接口(MIDI)audio/midi audio/x-midi.mjsJavaScript 模块text/javascript.mpegMPEG 视频video/mpeg.mpkg苹果安装程序包application/vnd.apple.installer+xml.odpOpenDocument演示文档application/vnd.oasis.opendocument.presentation.odsOpenDocument 电子表格文件application/vnd.oasis.opendocument.spreadsheet.odtOpenDocument 文本文档application/vnd.oasis.opendocument.text.ogaOGG 音频audio/ogg.ogvOGG 视频video/ogg.ogxOGGapplication/ogg.otfOpenType 字体font/otf.rarRAR 存档application/x-rar-compressed.rtf富文本格式 (RTF)application/rtf.shBourne shell 脚本application/x-sh.svg可缩放矢量图形 (SVG)image/svg+xml.swf小型web格式 (SWF) or Adobe Flash documentapplication/x-shockwave-flash.tarTape 归档(TAR)application/x-tar.tif标记图像文件格式 (TIFF)image/tiff.tiffTagged Image File Format (TIFF)image/tiff.ttfrueType 字体font/ttf.txtTexttext/plain.vsdMicrosoft Visioapplication/vnd.visio.wav波形音频格式audio/wav.webaWEBM 音频audio/webm.webmEBM 视频video/webm.webpWEBP 图片image/webp.woff网页开放字体格式 (WOFF)font/woff.woff2网页开放字体格式 (WOFF)font/woff2.xhtmlXHTMLapplication/xhtml+xml.xmlXMLapplication/xml(普通用户不可读)、text/xml(普通用户可读).xulXULapplication/vnd.mozilla.xul+xml.zipZIPapplication/zip.3gp3GPP audio/video 容器video/3gpp、audio/3gpp(不含视频).3g23GPP2 audio/video 容器video/3gpp2、audio/3gpp2(不含视频).7z7-zipapplication/x-7z-compressed
来源:https://www.cnblogs.com/fishlittle/p/17566021.html
免责声明:由于采集信息均来自互联网,如果侵犯了您的权益,请联系我们【E-Mail:cb@itdo.tech】 我们会及时删除侵权内容,谢谢合作! |
|