为您推荐:
精华内容
最热下载
问答
  • 161KB weixin_42099176 2021-04-26 04:34:02
  • 160KB tank2308635 2008-01-07 13:19:40
  • 点击“业务管理”→“虚拟主机管理...后缀名(一定要加.),在“Mime类型”填写对应的类型(Mime类型请参考下面列表),然后点击“马上设置”如下图application/octet-stream323 text/h323acx application/internet-prop...

    第一步:用您的用户名登陆网站进入会员中心。点击“业务管理”→“虚拟主机管理”→“管理” →“自定义Mime类型”。

    第二步:在“扩展名”填写.后缀名(一定要加.),在“Mime类型”填写对应的类型(Mime类型请参考下面列表),然后点击“马上设置”如下图

    321daf065eba60af1aa1bbd513867197.png

    application/octet-stream

    323     text/h323

    acx     application/internet-property-stream

    ai     application/postscript

    aif     audio/x-aiff

    aifc     audio/x-aiff

    aiff     audio/x-aiff

    asf     video/x-ms-asf

    asr     video/x-ms-asf

    asx     video/x-ms-asf

    au     audio/basic

    avi     video/x-msvideo

    axs     application/olescript

    bas     text/plain

    bcpio     application/x-bcpio

    bin     application/octet-stream

    bmp     image/bmp

    c     text/plain

    cat     application/vnd.ms-pkiseccat

    cdf     application/x-cdf

    cer     application/x-x509-ca-cert

    class     application/octet-stream

    clp     application/x-msclip

    cmx     image/x-cmx

    cod     image/cis-cod

    cpio     application/x-cpio

    crd     application/x-mscardfile

    crl     application/pkix-crl

    crt     application/x-x509-ca-cert

    csh     application/x-csh

    css     text/css

    dcr     application/x-director

    der     application/x-x509-ca-cert

    dir     application/x-director

    dll     application/x-msdownload

    dms     application/octet-stream

    doc     application/msword

    dot     application/msword

    dvi     application/x-dvi

    dxr     application/x-director

    eps     application/postscript

    etx     text/x-setext

    evy     application/envoy

    exe     application/octet-stream

    fif     application/fractals

    flr     x-world/x-vrml

    gif     image/gif

    gtar     application/x-gtar

    gz     application/x-gzip

    h     text/plain

    hdf     application/x-hdf

    hlp     application/winhlp

    hqx     application/mac-binhex40

    hta     application/hta

    htc     text/x-component

    htm     text/html

    html     text/html

    htt     text/webviewhtml

    ico     image/x-icon

    ief     image/ief

    iii     application/x-iphone

    ins     application/x-internet-signup

    isp     application/x-internet-signup

    jfif     image/pipeg

    jpe     image/jpeg

    jpeg     image/jpeg

    jpg     image/jpeg

    js     application/x-javascript

    latex     application/x-latex

    lha     application/octet-stream

    lsf     video/x-la-asf

    lsx     video/x-la-asf

    lzh     application/octet-stream

    m13     application/x-msmediaview

    m14     application/x-msmediaview

    m3u     audio/x-mpegurl

    man     application/x-troff-man

    mdb     application/x-msaccess

    me     application/x-troff-me

    mht     message/rfc822

    mhtml     message/rfc822

    mid     audio/mid

    mny     application/x-msmoney

    mov     video/quicktime

    movie     video/x-sgi-movie

    mp2     video/mpeg

    mp3     audio/mpeg

    mpa     video/mpeg

    mpe     video/mpeg

    mpeg     video/mpeg

    mpg     video/mpeg

    mpp     application/vnd.ms-project

    mpv2     video/mpeg

    ms     application/x-troff-ms

    mvb     application/x-msmediaview

    nws     message/rfc822

    oda     application/oda

    p10     application/pkcs10

    p12     application/x-pkcs12

    p7b     application/x-pkcs7-certificates

    p7c     application/x-pkcs7-mime

    p7m     application/x-pkcs7-mime

    p7r     application/x-pkcs7-certreqresp

    p7s     application/x-pkcs7-signature

    pbm     image/x-portable-bitmap

    pdf     application/pdf

    pfx     application/x-pkcs12

    pgm     image/x-portable-graymap

    pko     application/ynd.ms-pkipko

    pma     application/x-perfmon

    pmc     application/x-perfmon

    pml     application/x-perfmon

    pmr     application/x-perfmon

    pmw     application/x-perfmon

    pnm     image/x-portable-anymap

    pot,     application/vnd.ms-powerpoint

    ppm     image/x-portable-pixmap

    pps     application/vnd.ms-powerpoint

    ppt     application/vnd.ms-powerpoint

    prf     application/pics-rules

    ps     application/postscript

    pub     application/x-mspublisher

    qt     video/quicktime

    ra     audio/x-pn-realaudio

    ram     audio/x-pn-realaudio

    ras     image/x-cmu-raster

    rgb     image/x-rgb

    rmi     audio/mid

    roff     application/x-troff

    rtf     application/rtf

    rtx     text/richtext

    scd     application/x-msschedule

    sct     text/scriptlet

    setpay     application/set-payment-initiation

    setreg     application/set-registration-initiation

    sh     application/x-sh

    shar     application/x-shar

    sit     application/x-stuffit

    snd     audio/basic

    spc     application/x-pkcs7-certificates

    spl     application/futuresplash

    src     application/x-wais-source

    sst     application/vnd.ms-pkicertstore

    stl     application/vnd.ms-pkistl

    stm     text/html

    svg     image/svg+xml

    sv4cpio     application/x-sv4cpio

    sv4crc     application/x-sv4crc

    swf     application/x-shockwave-flash

    t     application/x-troff

    tar     application/x-tar

    tcl     application/x-tcl

    tex     application/x-tex

    texi     application/x-texinfo

    texinfo     application/x-texinfo

    tgz     application/x-compressed

    tif     image/tiff

    tiff     image/tiff

    tr     application/x-troff

    trm     application/x-msterminal

    tsv     text/tab-separated-values

    txt     text/plain

    uls     text/iuls

    ustar     application/x-ustar

    vcf     text/x-vcard

    vrml     x-world/x-vrml

    wav     audio/x-wav

    wcm     application/vnd.ms-works

    wdb     application/vnd.ms-works

    wks     application/vnd.ms-works

    wmf     application/x-msmetafile

    wps     application/vnd.ms-works

    wri     application/x-mswrite

    wrl     x-world/x-vrml

    wrz     x-world/x-vrml

    xaf     x-world/x-vrml

    xbm     image/x-xbitmap

    xla     application/vnd.ms-excel

    xlc     application/vnd.ms-excel

    xlm     application/vnd.ms-excel

    xls     application/vnd.ms-excel

    xlt     application/vnd.ms-excel

    xlw     application/vnd.ms-excel

    xof     x-world/x-vrml

    xpm     image/x-xpixmap

    xwd     image/x-xwindowdump

    z         application/x-compress

    zip     application/zip

    展开全文
    weixin_31796803 2021-06-24 12:08:37
  • MIME(Multipurpose Internet Mail Extensions)多用途互联网邮件扩展类型。是设定某种扩展名的文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候,浏览器会自动使用指定应用程序来打开。多用于指定...

    MIME(Multipurpose Internet Mail Extensions)多用途互联网邮件扩展类型。是设定某种扩展名文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候,浏览器会自动使用指定应用程序来打开。多用于指定一些客户端自定义文件名,以及一些媒体文件打开方式。

    它是一个互联网标准,扩展了电子邮件标准,使其能够支持:

    • ASCII字符文本;
    • 非文本格式附件(二进制、声音、图像等);
    • 由多部分(multiple parts)组成的消息体;
    • 包含非ASCII字符的头信息(Header information)。

    这个标准被定义在RFC 2045、RFC 2046、RFC 2047、RFC 2048、RFC 2049等RFC中。 MIME改善了由RFC 822转变而来的RFC 2822,这些旧标准规定电子邮件标准并不允许在邮件消息中使用7位ASCII字符集以外的字符。正因如此,一些非英语字符消息和二进制文件,图像,声音等非文字消息原本都不能在电子邮件中传输(MIME可以)。MIME规定了用于表示各种各样的数据类型的符号化方法。 此外,在万维网中使用的HTTP协议中也使用了MIME的框架,标准被扩展为互联网媒体类型

    背景介绍

    多用途互联网邮件扩展,它是一个互联网标准,在1992年最早应用于电子邮件系统,但后来也应用到浏览器服务器会将它们发送的多媒体数据的类型告诉浏览器,而通知手段就是说明该多媒体数据的MIME类型,从而让浏览器知道接收到的信息哪些是MP3文件,哪些是Shockwave文件等等。服务器将MIME标志符放入传送的数据中来告诉浏览器使用哪种插件读取相关文件

    MIME能够支持非ASCII字符、二进制格式附件等多种格式的邮件消息。这个标准被定义在RFC 2045,RFC 2046,RFC 2047,RFC 2048,RFC 2049等RFC中。 由RFC 822转变而来的RFC 2822,规定电子邮件标准并不允许在邮件消息中使用7位ASCII字符集以外的字符。正因如此,一些非英语字符消息和二进制文件,图像,声音等非文字消息都不能在电子邮件中传输。MIME规定了用于表示各种各样的数据类型的符号化方法。

    浏览器接收到文件后,会进入插件系统进行查找,查找出哪种插件可以识别读取接收到的文件。如果浏览器不清楚调用哪种插件系统,它可能会告诉用户缺少某插件,或者直接选择某现有插件来试图读取接收到的文件,或者可能会导致系统的崩溃。传输的信息中缺少MIME标识可能导致的情况很难估计,因为某些计算机系统可能不会出现什么故障,但某些计算机可能就会因此而崩溃。

    检查一个服务器是否正确设置了MIME类型的步骤是:

    1. Netscape浏览器中打开服务器网页。

    2. 进入"Tools"菜单,选择"Page Info"。

    3. 在弹出的窗口中点击上层框架中的"EMBED"。

    在下层框架中查看MIME的类型是否为"application/x-director"或"application/x-shockwave-flash",如果是上述信息的话表明服务器已经正确设置了MIME类型;而如果MIME类型列出的是文本内容、八位一组的数据或是其它形式均表明服务器的MIME类型没有设置正确。

    如果服务器没有正确标明其发送的数据的类型,服务器管理员应该正确添加相关信息,具体操作方法非常简单快捷。

    Microsoft公司应用于Windows系统下的浏览器使用ActiveX控件,而不是Netscape插件,这种浏览器不必象其它浏览器那样依靠MIME的编码。"OBJECT"标签的"CLSID"属性准确地标明了应调用哪种程序来读取接收到的文件,因此浏览器不必象"EMBED"标签那样选择一种读取程序。正因为如此,你往往会在使用带插件浏览器时遇到MIME问题,而使用ActiveX控件的浏览器则很少出现此类麻烦。

    正由于上述工作方式的差别也解释了一种现象,不知你是否发现在使用Netscape浏览器播放WAV文件时,浏览器会调用LiveConnect插件进行播放,而其它浏览器一般都使用通用的QuickTime的播放插件等来进行播放,这是因为Netscape浏览器接收文件需要读取MIME标识符,以便决定调用哪种程序来读取接收的文件,而服务器设置在Netscape浏览器中播放WAV文件应使用LiveConnect插件,因此Netscape浏览器接收到WAV格式的文件时必然就会调用LiveConnect插件,但由于其它浏览器不使用这种方式,因此它们都使用系统默认的播放WAV格式文件的播放器。当然Flash电影文件并不存在这种问题,因为只有Flash播放器才能够正确读取这种格式的文件。

    在把输出结果传送到浏览器上的时候,浏览器必须启动适当的应用程序来处理这个输出文档。这可以通过多种类型MIME(多功能网际邮件扩充协议)来完成。在HTTP中,MIME类型被定义在Content-Type header中。

    例如,假设你要传送一个Microsoft Excel文件到客户端。那么这时的MIME类型就是“excel”。在大多数实际情况中,这个文件然后将传送给Excel来处理(假设我们设定Excel为处理特殊MIME类型的应用程序)。在ASP中,设定MIME类型的方法是通过Response对象的ContentType属性。

    文件格式

    最早的HTTP协议中,并没有附加的数据类型信息,所有传送的数据都被客户程序解释为超文本标记语言HTML 文档,而为了支持多媒体数据类型,HTTP协议中就使用了附加在文档之前的MIME数据类型信息来标识数据类型

    MIME意为多功能Internet邮件扩展,它设计的最初目的是为了在发送电子邮件时附加多媒体数据,让邮件客户程序能根据其类型进行处理。然而当它被HTTP协议支持之后,它的意义就更为显著了。它使得HTTP传输的不仅是普通的文本,而变得丰富多彩。

    每个MIME类型由两部分组成,前面是数据的大类别,例如声音audio、图象image等,后面定义具体的种类

    常见的MIME类型(通用型):

    超文本标记语言文本

    .html text/html(html文本)

    xml文档.xml text/xml(xml文本)
    XHTML文档.xhtml application/xhtml+xml(xhtml+xml应用)
    普通文本.txt text/plain(普通文本)
    RTF文本.rtf application/rtf(rtf应用)
    PDF文档 .pdf application/pdf(pdf应用)
    Microsoft Word文件.word application/msword(msword应用)
    PNG图像.png image/png(png图像)
    GIF图形.gif image/gif(gif图像)
    JPEG图形.jpeg,.jpg image/jpeg(jpeg图像)
    au声音文件 .au audio/basic
    MIDI音乐文件.mid,.midi audio/midi,audio/x-midi
    RealAudio音乐文件 .ra, .ram audio/x-pn-realaudio
    MPEG文件 .mpg,.mpeg video/mpeg
    AVI文件 .avi video/x-msvideo
    GZIP文件 .gz application/x-gzip
    TAR文件 .tar application/x-tar
    任意的二进制数据application/octet-stream字节流,二进制流,octet(八重奏,意思是因特网标准使用八位组)

     

    用于WAP服务器的MIME类型有:

    MRP文件(国内普遍的手机)

    .mrp application/octet-stream

    IPA文件(IPHONE)

    .ipa application/iphone-package-archive

     

    .deb application/x-debian-package-archive

    APK文件(安卓系统)

    .apk application/vnd.android.package-archive

    CAB文件(Windows Mobile)

    .cab application/vnd.cab-com-archive

    XAP文件(Windows Phone 7)

    .xap application/x-silverlight-app

    SIS文件(symbian平台/S60V1)

    .sis application/vnd.symbian.install-archive *(下有)

    SISX文件(symbian平台/S60V3/V5)

    .sisx application/vnd.symbian.epoc/x-sisx-app

    JAR、JAD文件(JAVA平台手机通用格式)

    .jar .jad下面有

    Internet中有一个专门组织IANA来确认标准的MIME类型,但Internet发展的太快,很多应用程序等不及IANA来确认他们使用的MIME类型为标准类型。因此他们使用在类别中以x-开头的方法标识这个类别还没有成为标准,例如:x-gzip,x-tar等。事实上这些类型运用的很广泛,已经成为了事实标准。只要客户机和服务器共同承认这个MIME类型,即使它是不标准的类型也没有关系,客户程序就能根据MIME类型,采用具体的处理手段来处理数据。而Web服务器浏览器(包括操作系统)中,缺省都设置了标准的和常见的MIME类型,只有对于不常见的 MIME类型,才需要同时设置服务器和客户浏览器,以进行识别。

    由于MIME类型与文档的后缀相关,因此服务器使用文档的后缀来区分不同文件的MIME类型,服务器中必须定义文档后缀和MIME类型之间的对应关系。而客户程序从服务器上接收数据的时候,它只是从服务器接受数据流,并不了解文档的名字,因此服务器必须使用附加信息来告诉客户程序数据的MIME类型。服务器在发送真正的数据之前,就要先发送标志数据的MIME类型的信息,这个信息使用Content-type关键字进行定义,例如对于HTML文档,服务器将首先发送以下两行MIME标识信息,这个标识并不是真正的数据文件的一部分。

    Content-type: text/html

    注意,第二行为一个空行,这是必须的,使用这个空行的目的是将MIME信息与真正的数据内容分隔开。

    MIME利用了一个事实就是,RFC 822在消息体的内容中做了一点限制:唯一的限制就是只能使用简单的ASCII文本。所以,MIME信息由正常的Internet文本邮件组成,文本邮件拥有一些特别的符合RFC 822的信息头和格式化过的信息体(用ASCII 的子集来表示的附件)。这些MIME头给出了一种在邮件中表示附件的特别的方法。

    信息剖析

    一个普通的文本邮件的信息包含一个头部分(To: From: Subject: 等等)和一个体部分(Hello Mr.,等等)。在一个符合MIME的信息中,也包含一个信息头并不奇怪,邮件的各个部分叫做MIME段,每段前也缀以一个特别的头。MIME邮件只是基于RFC 822邮件的一个扩展,然而它有着自己的RFC规范集。

    头字段

    MIME头根据在邮件包中的位置,大体上分为MIME信息头和MIME段头。(译者:MIME信息头指整个邮件的头,而MIME段头只每个MIME段的头。)

    MIME信息头有:

    MIME-Version:

    这个头提供了所用MIME的版本号。这个值习惯上为1.0。

    Content-Type:

    它定义了数据的类型,以便数据能被适当的处理。有效的类型有:text,image,audio,video,applications,multipart和message。注意任何一个二进制附件都应该被叫做application/octet- stream。这个头的一些用例为:image/jpg, application/mswork,multipart/mixed,这只是很少的一部分。

    Content-Transfer-Encoding:

    这是所有头中最重要的一个,因为它说明了对数据所执行的编码方式,客户/MUA 将用它对附件进行解码。对于每个附件,可以使用7bit,8bit,binary ,quoted-printable,base64和custom中的一种编码方式。7bit编码是用在US ASCII字符集上的常用的一种编码方式,也就是,保持它的原样。8bit和binary编码一般不用。对人类可读的标准文本,如果传输要经过对格式有影响的网关时对其进行保护,可以使用quoted printable 。Base64是一种通用方法,在需要决定使用哪一种编码方法时,它提供了一个不用费脑子的选择;它通常用在二进制,非文本数据上。注意,任何非7bit 数据必须用一种模式编码,这样它就可以通过Internet邮件网关

    Content-ID:

    如果Content-Type是message/external-body或multipart/alternative时,这个头就有用了,它超出了本文的范围。

    Content-Description:

    这是一个可选的头。它是任何信息段内容的自由文本描述。描述必须使用us-ascii码。

    Content-Disposition:

    一个试验性的头,它用于给客户程序/MUA提供提示,来决定是否在行内显示附件或作为单独的附件。

    MIME段头(出现在实际的MIME附件部分的头),除了MIME-Version头,可以拥有以上任何头字段。如果一个MIME头是信息块的一部分,它将作用于整个信息体。例如,如果Content-Transfer-Encoding显示在信息(指整个信息)头中,它应用于整个信息体,但是如果它显示在一个MIME段里,它"只能"用于那个段中。

    注意:其可以对自动对收到的邮件进行解密。

    类型大全

    按照内容类型排列的 Mime 类型列表

    类型/子类型扩展名
    application/envoyevy
    application/fractalsfif
    application/futuresplashspl
    application/htahta
    application/internet-property-streamacx
    application/mac-binhex40hqx
    application/msworddoc
    application/msworddot
    application/octet-stream*
    application/octet-streambin
    application/octet-streamclass
    application/octet-streamdms
    application/octet-streamexe
    application/octet-streamlha
    application/octet-streamlzh
    application/odaoda
    application/olescriptaxs
    application/pdfpdf
    application/pics-rulesprf
    application/pkcs10p10
    application/pkix-crlcrl
    application/postscriptai
    application/postscripteps
    application/postscriptps
    application/rtfrtf
    application/set-payment-initiationsetpay
    application/set-registration-initiationsetreg
    application/vnd.ms-excelxla
    application/vnd.ms-excelxlc
    application/vnd.ms-excelxlm
    application/vnd.ms-excelxls
    application/vnd.ms-excelxlt
    application/vnd.ms-excelxlw
    application/vnd.ms-outlookmsg
    application/vnd.ms-pkicertstoresst
    application/vnd.ms-pkiseccatcat
    application/vnd.ms-pkistlstl
    application/vnd.ms-powerpointpot
    application/vnd.ms-powerpointpps
    application/vnd.ms-powerpointppt
    application/vnd.ms-projectmpp
    application/vnd.ms-workswcm
    application/vnd.ms-workswdb
    application/vnd.ms-workswks
    application/vnd.ms-workswps
    application/winhlphlp
    application/x-bcpiobcpio
    application/x-cdfcdf
    application/x-compressz
    application/x-compressedtgz
    application/x-cpiocpio
    application/x-cshcsh
    application/x-directordcr
    application/x-directordir
    application/x-directordxr
    application/x-dvidvi
    application/x-gtargtar
    application/x-gzipgz
    application/x-hdfhdf
    application/x-internet-signupins
    application/x-internet-signupisp
    application/x-iphoneiii
    application/x-javascriptjs
    application/x-latexlatex
    application/x-msaccessmdb
    application/x-mscardfilecrd
    application/x-msclipclp
    application/x-msdownloaddll
    application/x-msmediaviewm13
    application/x-msmediaviewm14
    application/x-msmediaviewmvb
    application/x-msmetafilewmf
    application/x-msmoneymny
    application/x-mspublisherpub
    application/x-msschedulescd
    application/x-msterminaltrm
    application/x-mswritewri
    application/x-netcdfcdf
    application/x-netcdfnc
    application/x-perfmonpma
    application/x-perfmonpmc
    application/x-perfmonpml
    application/x-perfmonpmr
    application/x-perfmonpmw
    application/x-pkcs12p12
    application/x-pkcs12pfx
    application/x-pkcs7-certificatesp7b
    application/x-pkcs7-certificatesspc
    application/x-pkcs7-certreqrespp7r
    application/x-pkcs7-mimep7c
    application/x-pkcs7-mimep7m
    application/x-pkcs7-signaturep7s
    application/x-shsh
    application/x-sharshar
    application/x-shockwave-flashswf
    application/x-stuffitsit
    application/x-sv4cpiosv4cpio
    application/x-sv4crcsv4crc
    application/x-tartar
    application/x-tcltcl
    application/x-textex
    application/x-texinfotexi
    application/x-texinfotexinfo
    application/x-troffroff
    application/x-trofft
    application/x-trofftr
    application/x-troff-manman
    application/x-troff-meme
    application/x-troff-msms
    application/x-ustarustar
    application/x-wais-sourcesrc
    application/x-x509-ca-certcer
    application/x-x509-ca-certcrt
    application/x-x509-ca-certder
    application/ynd.ms-pkipkopko
    application/zipzip
    audio/basicau
    audio/basicsnd
    audio/midmid
    audio/midrmi
    audio/mpegmp3
    audio/x-aiffaif
    audio/x-aiffaifc
    audio/x-aiffaiff
    audio/x-mpegurlm3u
    audio/x-pn-realaudiora
    audio/x-pn-realaudioram
    audio/x-wavwav
    image/bmpbmp
    image/cis-codcod
    image/gifgif
    image/iefief
    image/jpegjpe
    image/jpegjpeg
    image/jpegjpg
    image/pipegjfif
    image/svg+xmlsvg
    image/tifftif
    image/tifftiff
    image/x-cmu-rasterras
    image/x-cmxcmx
    image/x-iconico
    image/x-portable-anymappnm
    image/x-portable-bitmappbm
    image/x-portable-graymappgm
    image/x-portable-pixmapppm
    image/x-rgbrgb
    image/x-xbitmapxbm
    image/x-xpixmapxpm
    image/x-xwindowdumpxwd
    message/rfc822mht
    message/rfc822mhtml
    message/rfc822nws
    text/csscss
    text/h323323
    text/htmlhtm
    text/htmlhtml
    text/htmlstm
    text/iulsuls
    text/plainbas
    text/plainc
    text/plainh
    text/plaintxt
    text/richtextrtx
    text/scriptletsct
    text/tab-separated-valuestsv
    text/webviewhtmlhtt
    text/x-componenthtc
    text/x-setextetx
    text/x-vcardvcf
    video/mpegmp2
    video/mpegmpa
    video/mpegmpe
    video/mpegmpeg
    video/mpegmpg
    video/mpegmpv2
    video/quicktimemov
    video/quicktimeqt
    video/x-la-asflsf
    video/x-la-asflsx
    video/x-ms-asfasf
    video/x-ms-asfasr
    video/x-ms-asfasx
    video/x-msvideoavi
    video/x-sgi-moviemovie
    x-world/x-vrmlflr
    x-world/x-vrmlvrml
    x-world/x-vrmlwrl
    x-world/x-vrmlwrz
    x-world/x-vrmlxaf
    x-world/x-vrmlxof

    按照文件扩展名排列的 Mime 类型列表

    扩展名类型/子类型
     application/octet-stream
    323text/h323
    acxapplication/internet-property-stream
    aiapplication/postscript
    aifaudio/x-aiff
    aifcaudio/x-aiff
    aiffaudio/x-aiff
    asfvideo/x-ms-asf
    asrvideo/x-ms-asf
    asxvideo/x-ms-asf
    auaudio/basic
    avivideo/x-msvideo
    axsapplication/olescript
    bastext/plain
    bcpioapplication/x-bcpio
    binapplication/octet-stream
    bmpimage/bmp
    ctext/plain
    catapplication/vnd.ms-pkiseccat
    cdfapplication/x-cdf
    cerapplication/x-x509-ca-cert
    classapplication/octet-stream
    clpapplication/x-msclip
    cmximage/x-cmx
    codimage/cis-cod
    cpioapplication/x-cpio
    crdapplication/x-mscardfile
    crlapplication/pkix-crl
    crtapplication/x-x509-ca-cert
    cshapplication/x-csh
    csstext/css
    dcrapplication/x-director
    derapplication/x-x509-ca-cert
    dirapplication/x-director
    dllapplication/x-msdownload
    dmsapplication/octet-stream
    docapplication/msword
    dotapplication/msword
    dviapplication/x-dvi
    dxrapplication/x-director
    epsapplication/postscript
    etxtext/x-setext
    evyapplication/envoy
    exeapplication/octet-stream
    fifapplication/fractals
    flrx-world/x-vrml
    gifimage/gif
    gtarapplication/x-gtar
    gzapplication/x-gzip
    htext/plain
    hdfapplication/x-hdf
    hlpapplication/winhlp
    hqxapplication/mac-binhex40
    htaapplication/hta
    htctext/x-component
    htmtext/html
    htmltext/html
    htttext/webviewhtml
    icoimage/x-icon
    iefimage/ief
    iiiapplication/x-iphone
    insapplication/x-internet-signup
    ispapplication/x-internet-signup
    jfifimage/pipeg
    jpeimage/jpeg
    jpegimage/jpeg
    jpgimage/jpeg
    jsapplication/x-javascript
    latexapplication/x-latex
    lhaapplication/octet-stream
    lsfvideo/x-la-asf
    lsxvideo/x-la-asf
    lzhapplication/octet-stream
    m13application/x-msmediaview
    m14application/x-msmediaview
    m3uaudio/x-mpegurl
    manapplication/x-troff-man
    mdbapplication/x-msaccess
    meapplication/x-troff-me
    mhtmessage/rfc822
    mhtmlmessage/rfc822
    midaudio/mid
    mnyapplication/x-msmoney
    movvideo/quicktime
    movievideo/x-sgi-movie
    mp2video/mpeg
    mp3audio/mpeg
    mpavideo/mpeg
    mpevideo/mpeg
    mpegvideo/mpeg
    mpgvideo/mpeg
    mppapplication/vnd.ms-project
    mpv2video/mpeg
    msapplication/x-troff-ms
    mvbapplication/x-msmediaview
    nwsmessage/rfc822
    odaapplication/oda
    p10application/pkcs10
    p12application/x-pkcs12
    p7bapplication/x-pkcs7-certificates
    p7capplication/x-pkcs7-mime
    p7mapplication/x-pkcs7-mime
    p7rapplication/x-pkcs7-certreqresp
    p7sapplication/x-pkcs7-signature
    pbmimage/x-portable-bitmap
    pdfapplication/pdf
    pfxapplication/x-pkcs12
    pgmimage/x-portable-graymap
    pkoapplication/ynd.ms-pkipko
    pmaapplication/x-perfmon
    pmcapplication/x-perfmon
    pmlapplication/x-perfmon
    pmrapplication/x-perfmon
    pmwapplication/x-perfmon
    pnmimage/x-portable-anymap
    pot,application/vnd.ms-powerpoint
    ppmimage/x-portable-pixmap
    ppsapplication/vnd.ms-powerpoint
    pptapplication/vnd.ms-powerpoint
    prfapplication/pics-rules
    psapplication/postscript
    pubapplication/x-mspublisher
    qtvideo/quicktime
    raaudio/x-pn-realaudio
    ramaudio/x-pn-realaudio
    rasimage/x-cmu-raster
    rgbimage/x-rgb
    rmiaudio/mid
    roffapplication/x-troff
    rtfapplication/rtf
    rtxtext/richtext
    scdapplication/x-msschedule
    scttext/scriptlet
    setpayapplication/set-payment-initiation
    setregapplication/set-registration-initiation
    shapplication/x-sh
    sharapplication/x-shar
    sitapplication/x-stuffit
    sndaudio/basic
    spcapplication/x-pkcs7-certificates
    splapplication/futuresplash
    srcapplication/x-wais-source
    sstapplication/vnd.ms-pkicertstore
    stlapplication/vnd.ms-pkistl
    stmtext/html
    svgimage/svg+xml
    sv4cpioapplication/x-sv4cpio
    sv4crcapplication/x-sv4crc
    swfapplication/x-shockwave-flash
    tapplication/x-troff
    tarapplication/x-tar
    tclapplication/x-tcl
    texapplication/x-tex
    texiapplication/x-texinfo
    texinfoapplication/x-texinfo
    tgzapplication/x-compressed
    tifimage/tiff
    tiffimage/tiff
    trapplication/x-troff
    trmapplication/x-msterminal
    tsvtext/tab-separated-values
    txttext/plain
    ulstext/iuls
    ustarapplication/x-ustar
    vcftext/x-vcard
    vrmlx-world/x-vrml
    wavaudio/x-wav
    wcmapplication/vnd.ms-works
    wdbapplication/vnd.ms-works
    wksapplication/vnd.ms-works
    wmfapplication/x-msmetafile
    wpsapplication/vnd.ms-works
    wriapplication/x-mswrite
    wrlx-world/x-vrml
    wrzx-world/x-vrml
    xafx-world/x-vrml
    xbmimage/x-xbitmap
    xlaapplication/vnd.ms-excel
    xlcapplication/vnd.ms-excel
    xlmapplication/vnd.ms-excel
    xlsapplication/vnd.ms-excel
    xltapplication/vnd.ms-excel
    xlwapplication/vnd.ms-excel
    xofx-world/x-vrml
    xpmimage/x-xpixmap
    xwdimage/x-xwindowdump
    zapplication/x-compress
    zipapplication/zip

    传输编码

    内容传输编码(Content-Transfer-Encoding),这个区域使指定ASCII以外的字符编码方式成为可能。形式如下:

    Content-Transfer-Encoding: [mechanism]

    其中,mechanism的值可以指定为“7bit”,“8bit”,“binary”,“quoted-printable”,“base64”。

    7bit

    7bit这里指的是7位的ASCII编码方式。

    8bit

    8位元ASCII码。

    binary

    quoted-printable

    因为欧洲的一些文字和ASCII字符集中的某些字符有部分相同。如果邮件消息使用的是这些语言的话,于ASCII重叠的那些字符可以原样使用,ASCII字符集中不存在的字符采用形如“=??”的方法编码。这里“??”需要用将字符编码后的16进制数字来指定。采用quoted-printable编码的消息,长度不会变得太长,而且大部分都是ASCII中的字符,即使不通过解码也大致可以读懂消息的内容。

    base64

    base64是一种将二进制的01序列转化成ASCII字符的编码方法。编码后的文本或者二进制消息,就可以运用SMTP等只支持ASCII字符的协议传送了。Base64一般被认为会平均增加33%的报文长度,而且,经过编码的消息对于人类来说是不可读的。

    x-encodingname

    这个值是预留的扩展。

    展开全文
    fuhanghang 2020-04-06 17:50:52
  • 获取MIME:HttpContext.Current.Request.Files[fileKey].ContentLengthMIME类型就是设定某种扩展名的文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候,浏览器会自动使用指定应用程序来打开。...

    获取MIME:HttpContext.Current.Request.Files[fileKey].ContentLength

    MIME类型就是设定某种扩展名的文件用一种应用程序来打开的方式类型,当该扩展名文件被访问的时候,浏览器会自动使用指定应用程序来打开。多用于指定一些客户端自定义的文件名,以及一些媒体文件打开方式。

    下面列出常用的文件对应的MIME类型:

    Mime-Types(mime类型)

    Dateiendung(扩展名)

    Bedeutung

    application/msexcel

    *.xls *.xla

    Microsoft Excel Dateien

    application/mshelp

    *.hlp *.chm

    Microsoft Windows Hilfe Dateien

    application/mspowerpoint

    *.ppt *.ppz *.pps *.pot

    Microsoft Powerpoint Dateien

    application/msword

    *.doc *.dot

    Microsoft Word Dateien

    application/octet-stream

    *.exe

    exe

    application/pdf

    *.pdf

    Adobe PDF-Dateien

    application/post******

    *.ai *.eps *.ps

    Adobe Post******-Dateien

    application/rtf

    *.rtf

    Microsoft RTF-Dateien

    application/x-httpd-php

    *.php *.phtml

    PHP-Dateien

    application/x-java******

    *.js

    serverseitige Java******-Dateien

    application/x-shockwave-flash

    *.swf *.cab

    Flash Shockwave-Dateien

    application/zip

    *.zip

    ZIP-Archivdateien

    audio/basic

    *.au *.snd

    Sound-Dateien

    audio/mpeg

    *.mp3

    MPEG-Dateien

    audio/x-midi

    *.mid *.midi

    MIDI-Dateien

    audio/x-mpeg

    *.mp2

    MPEG-Dateien

    audio/x-wav

    *.wav

    Wav-Dateien

    image/gif

    *.gif

    GIF-Dateien

    image/jpeg

    *.jpeg *.jpg *.jpe

    JPEG-Dateien

    image/x-windowdump

    *.xwd

    X-Windows Dump

    text/css

    *.css

    CSS Stylesheet-Dateien

    text/html

    *.htm *.html *.shtml

    -Dateien

    text/java******

    *.js

    Java******-Dateien

    text/plain

    *.txt

    reine Textdateien

    video/mpeg

    *.mpeg *.mpg *.mpe

    MPEG-Dateien

    video/vnd.rn-realvideo

    *.rmvb

    realplay-Dateien

    video/quicktime

    *.qt *.mov

    Quicktime-Dateien

    video/vnd.vivo

    *viv *.vivo

    Vivo-Dateien

    更多....查找请用ctrl+F

    MIME类型大全

    application/vnd.lotus-1-2-3

    3gp video/3gpp

    aab application/x-authoware-bin

    aam application/x-authoware-map

    aas application/x-authoware-seg

    ai application/post******

    aif audio/x-aiff

    aifc audio/x-aiff

    aiff audio/x-aiff

    als audio/X-Alpha5

    amc application/x-mpeg

    ani application/octet-stream

    asc text/plain

    asd application/astound

    asf video/x-ms-asf

    asn application/astound

    asp application/x-asap

    asx video/x-ms-asf

    au audio/basic

    avb application/octet-stream

    avi video/x-msvideo

    awb audio/amr-wb

    bcpio application/x-bcpio

    bin application/octet-stream

    bld application/bld

    bld2 application/bld2

    bmp application/x-MS-bmp

    bpk application/octet-stream

    bz2 application/x-bzip2

    cal image/x-cals

    ccn application/x-cnc

    cco application/x-cocoa

    cdf application/x-netcdf

    cgi magnus-internal/cgi

    chat application/x-chat

    class application/octet-stream

    clp application/x-msclip

    cmx application/x-cmx

    co application/x-cult3d-object

    cod image/cis-cod

    cpio application/x-cpio

    cpt application/mac-compactpro

    crd application/x-mscardfile

    csh application/x-csh

    csm chemical/x-csml

    csml chemical/x-csml

    css text/css

    cur application/octet-stream

    dcm x-lml/x-evm

    dcr application/x-director

    dcx image/x-dcx

    dhtml text/html

    dir application/x-director

    dll application/octet-stream

    dmg application/octet-stream

    dms application/octet-stream

    doc application/msword

    dot application/x-dot

    dvi application/x-dvi

    dwf drawing/x-dwf

    dwg application/x-autocad

    dxf application/x-autocad

    dxr application/x-director

    ebk application/x-expandedbook

    emb chemical/x-embl-dl-nucleotide

    embl chemical/x-embl-dl-nucleotide

    eps application/post******

    eri image/x-eri

    es audio/echospeech

    esl audio/echospeech

    etc application/x-earthtime

    etx text/x-setext

    evm x-lml/x-evm

    evy application/x-envoy

    exe application/octet-stream

    fh4 image/x-freehand

    fh5 image/x-freehand

    fhc image/x-freehand

    fif image/fif

    fm application/x-maker

    fpx image/x-fpx

    fvi video/isivideo

    gau chemical/x-gaussian-input

    gca application/x-gca-compressed

    gdb x-lml/x-gdb

    gif image/gif

    gps application/x-gps

    gtar application/x-gtar

    gz application/x-gzip

    hdf application/x-hdf

    hdm text/x-hdml

    hdml text/x-hdml

    hlp application/winhlp

    hqx application/mac-binhex40

    htm text/html

    html text/html

    hts text/html

    ice x-conference/x-cooltalk

    ico application/octet-stream

    ief image/ief

    ifm image/gif

    ifs image/ifs

    imy audio/melody

    ins application/x-NET-Install

    ips application/x-ip******

    ipx application/x-ipix

    it audio/x-mod

    itz audio/x-mod

    ivr i-world/i-vrml

    j2k image/j2k

    jad text/vnd.sun.j2me.app-de******or

    jam application/x-jam

    jar application/java-archive

    jnlp application/x-java-jnlp-file

    jpe image/jpeg

    jpeg image/jpeg

    jpg image/jpeg

    jpz image/jpeg

    js application/x-java******

    jwc application/jwc

    kjx application/x-kjx

    lak x-lml/x-lak

    latex application/x-latex

    lcc application/fastman

    lcl application/x-digitalloca

    lcr application/x-digitalloca

    lgh application/lgh

    lha application/octet-stream

    lml x-lml/x-lml

    lmlpack x-lml/x-lmlpack

    lsf video/x-ms-asf

    lsx video/x-ms-asf

    lzh application/x-lzh

    m13 application/x-msmediaview

    m14 application/x-msmediaview

    m15 audio/x-mod

    m3u audio/x-mpegurl

    m3url audio/x-mpegurl

    ma1 audio/ma1

    ma2 audio/ma2

    ma3 audio/ma3

    ma5 audio/ma5

    man application/x-troff-man

    map magnus-internal/imagemap

    mbd application/mbedlet

    mct application/x-mascot

    mdb application/x-msaccess

    mdz audio/x-mod

    me application/x-troff-me

    mel text/x-vmel

    mi application/x-mif

    mid audio/midi

    midi audio/midi

    mif application/x-mif

    mil image/x-cals

    mio audio/x-mio

    mmf application/x-skt-lbs

    mng video/x-mng

    mny application/x-msmoney

    moc application/x-mocha

    mocha application/x-mocha

    mod audio/x-mod

    mof application/x-yumekara

    mol chemical/x-mdl-molfile

    mop chemical/x-mopac-input

    mov video/quicktime

    movie video/x-sgi-movie

    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

    mpn application/vnd.mophun.application

    mpp application/vnd.ms-project

    mps application/x-mapserver

    mrl text/x-mrml

    mrm application/x-mrm

    ms application/x-troff-ms

    mts application/metastream

    mtx application/metastream

    mtz application/metastream

    mzv application/metastream

    nar application/zip

    nbmp image/nbmp

    nc application/x-netcdf

    ndb x-lml/x-ndb

    ndwn application/ndwn

    nif application/x-nif

    nmz application/x-scream

    nokia-op-logo image/vnd.nok-oplogo-color

    npx application/x-netfpx

    nsnd audio/nsnd

    nva application/x-neva1

    oda application/oda

    oom application/x-AtlasMate-Plugin

    pac audio/x-pac

    pae audio/x-epac

    pan application/x-pan

    pbm image/x-portable-bitmap

    pcx image/x-pcx

    pda image/x-pda

    pdb chemical/x-pdb

    pdf application/pdf

    pfr application/font-tdpfr

    pgm image/x-portable-graymap

    pict image/x-pict

    pm application/x-perl

    pmd application/x-pmd

    png image/png

    pnm image/x-portable-anymap

    pnz image/png

    pot application/vnd.ms-powerpoint

    ppm image/x-portable-pixmap

    pps application/vnd.ms-powerpoint

    ppt application/vnd.ms-powerpoint

    pqf application/x-cprplayer

    pqi application/cprplayer

    prc application/x-prc

    proxy application/x-ns-proxy-autoconfig

    ps application/post******

    ptlk application/listenup

    pub application/x-mspublisher

    pvx video/x-pv-pvx

    qcp audio/vnd.qcelp

    qt video/quicktime

    qti image/x-quicktime

    qtif image/x-quicktime

    r3t text/vnd.rn-realtext3d

    ra audio/x-pn-realaudio

    ram audio/x-pn-realaudio

    rar application/x-rar-compressed

    ras image/x-cmu-raster

    rdf application/rdf+xml

    rf image/vnd.rn-realflash

    rgb image/x-rgb

    rlf application/x-richlink

    rm audio/x-pn-realaudio

    rmf audio/x-rmf

    rmm audio/x-pn-realaudio

    rmvb audio/x-pn-realaudio

    rnx application/vnd.rn-realplayer

    roff application/x-troff

    rp image/vnd.rn-realpix

    rpm audio/x-pn-realaudio-plugin

    rt text/vnd.rn-realtext

    rte x-lml/x-gps

    rtf application/rtf

    rtg application/metastream

    rtx text/richtext

    rv video/vnd.rn-realvideo

    rwc application/x-rogerwilco

    s3m audio/x-mod

    s3z audio/x-mod

    sca application/x-supercard

    scd application/x-msschedule

    sdf application/e-score

    sea application/x-stuffit

    sgm text/x-sgml

    sgml text/x-sgml

    sh application/x-sh

    shar application/x-shar

    shtml magnus-internal/parsed-html

    shw application/presentations

    si6 image/si6

    si7 image/vnd.stiwap.sis

    si9 image/vnd.lgtwap.sis

    sis application/vnd.symbian.install

    sit application/x-stuffit

    skd application/x-Koan

    skm application/x-Koan

    skp application/x-Koan

    skt application/x-Koan

    slc application/x-salsa

    smd audio/x-smd

    smi application/smil

    smil application/smil

    smp application/studiom

    smz audio/x-smd

    snd audio/basic

    spc text/x-speech

    spl application/futuresplash

    spr application/x-sprite

    sprite application/x-sprite

    spt application/x-spt

    src application/x-wais-source

    stk application/hyperstudio

    stm audio/x-mod

    sv4cpio application/x-sv4cpio

    sv4crc application/x-sv4crc

    svf image/vnd

    svg image/svg-xml

    svh image/svh

    svr x-world/x-svr

    swf application/x-shockwave-flash

    swfl application/x-shockwave-flash

    t application/x-troff

    tad application/octet-stream

    talk text/x-speech

    tar application/x-tar

    taz application/x-tar

    tbp application/x-timbuktu

    tbt application/x-timbuktu

    tcl application/x-tcl

    tex application/x-tex

    texi application/x-texinfo

    texinfo application/x-texinfo

    tgz application/x-tar

    thm application/vnd.eri.thm

    tif image/tiff

    tiff image/tiff

    tki application/x-tkined

    tkined application/x-tkined

    toc application/toc

    toy image/toy

    tr application/x-troff

    trk x-lml/x-gps

    trm application/x-msterminal

    tsi audio/tsplayer

    tsp application/dsptype

    tsv text/tab-separated-values

    tsv text/tab-separated-values

    ttf application/octet-stream

    ttz application/t-time

    txt text/plain

    ult audio/x-mod

    ustar application/x-ustar

    uu application/x-uuencode

    uue application/x-uuencode

    vcd application/x-cdlink

    vcf text/x-vcard

    vdo video/vdo

    vib audio/vib

    viv video/vivo

    vivo video/vivo

    vmd application/vocaltec-media-desc

    vmf application/vocaltec-media-file

    vmi application/x-dreamcast-vms-info

    vms application/x-dreamcast-vms

    vox audio/voxware

    vqe audio/x-twinvq-plugin

    vqf audio/x-twinvq

    vql audio/x-twinvq

    vre x-world/x-vream

    vrml x-world/x-vrml

    vrt x-world/x-vrt

    vrw x-world/x-vream

    vts workbook/formulaone

    wav audio/x-wav

    wax audio/x-ms-wax

    wbmp image/vnd.wap.wbmp

    web application/vnd.xara

    wi image/wavelet

    wis application/x-InstallShield

    wm video/x-ms-wm

    wma audio/x-ms-wma

    wmd application/x-ms-wmd

    wmf application/x-msmetafile

    wml text/vnd.wap.wml

    wmlc application/vnd.wap.wmlc

    wmls text/vnd.wap.wml******

    wmlsc application/vnd.wap.wml******c

    wml****** text/vnd.wap.wml******

    wmv audio/x-ms-wmv

    wmx video/x-ms-wmx

    wmz application/x-ms-wmz

    wpng image/x-up-wpng

    wpt x-lml/x-gps

    wri application/x-mswrite

    wrl x-world/x-vrml

    wrz x-world/x-vrml

    ws text/vnd.wap.wml******

    wsc application/vnd.wap.wml******c

    wv video/wavelet

    wvx video/x-ms-wvx

    wxl application/x-wxl

    x-gzip application/x-gzip

    xar application/vnd.xara

    xbm image/x-xbitmap

    xdm application/x-xdma

    xdma application/x-xdma

    xdw application/vnd.fujixerox.docuworks

    xht application/xhtml+xml

    xhtm application/xhtml+xml

    xhtml application/xhtml+xml

    xla application/vnd.ms-excel

    xlc application/vnd.ms-excel

    xll application/x-excel

    xlm application/vnd.ms-excel

    xls application/vnd.ms-excel

    xlt application/vnd.ms-excel

    xlw application/vnd.ms-excel

    xm audio/x-mod

    xml text/xml

    xmz audio/x-mod

    xpi application/x-xpinstall

    xpm image/x-xpixmap

    xsit text/xml

    xsl text/xml

    xul text/xul

    xwd image/x-xwindowdump

    xyz chemical/x-pdb

    yz1 application/x-yz1

    z application/x-compress

    zac application/x-zaurus-zac

    zip application/zip

    展开全文
    weixin_34009282 2021-03-06 23:43:07
  • MIME_TYPE external/mime-support/mime.types frameworks/base/mime/java-res/android.mime.types MIME类型 MIME type的缩写为(Multipurpose Internet Mail Extensions)代表互联网媒体类型(Internet media type),...

    MIME_TYPE

    external/mime-support/mime.types
    frameworks/base/mime/java-res/android.mime.types

    1. MIME类型

    MIME type的缩写为(Multipurpose Internet Mail Extensions)代表互联网媒体类型(Internet media type),MIME使用一个简单的字符串

    组成,最初是为了标识邮件Email附件的类型,在html文件中可以使用content-type属性表示,描述了文件类型的互联网标准。

    MIME类型能包含视频、图像、文本、音频、应用程序等数据。Android开发中也会常常涉及到这已概念。

    一、intent过滤器中的MIME Type

    对于隐式意图,Android通过定义活动的Intent Filter(意图过滤器)来匹配隐式Intent对象,当一个intent对象被一个Intent Filter进行

    匹配测试时,有三个方面会被参考到:动作、data (URI以及数据类型)和类别。其中的data就和MIME Type有关。

    二、Provider 中的MIME Type

    Content providers能以字符串的形式返回标准的MIME Type或者自定义的MIME Type。 在自定义的ContentProvider类中,一般会重写getType()方法,用于返回一个与URI对应的MIMEType

    MIME media types and the extensions that represent them.
    external/mime-support/mime.types

    frameworks/base/mime/java-res/android.mime.types

    packages/apps/Bluetooth/Androidmanifest.xml

    <activity android:name=".opp.BluetoothOppLauncherActivity"
        android:process="@string/process"
        android:theme="@android:style/Theme.Material.Light.Dialog"
        android:label="@string/bt_share_picker_label"
        android:enabled="@bool/profile_supported_opp">
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="image/*" />
            <data android:mimeType="video/*" />
            <data android:mimeType="audio/*" />
            <data android:mimeType="text/x-vcard" />
            <data android:mimeType="text/x-vcalendar" />
            <data android:mimeType="text/calendar" />
            <data android:mimeType="text/plain" />
            <data android:mimeType="text/html" />
            <data android:mimeType="text/xml" />
            <data android:mimeType="application/zip" />
            <data android:mimeType="application/vnd.ms-excel" />
            <data android:mimeType="application/msword" />
            <data android:mimeType="application/vnd.ms-powerpoint" />
            <data android:mimeType="application/pdf" />
            <data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" />
            <data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" />
            <data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation" />
            <data android:mimeType="application/x-hwp" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND_MULTIPLE" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="image/*" />
            <data android:mimeType="video/*" />
            <data android:mimeType="x-mixmedia/*" />
            <data android:mimeType="text/x-vcard" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.btopp.intent.action.OPEN" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:mimeType="vnd.android.cursor.item/vnd.android.btopp" />
        </intent-filter>
    </activity>
    

    一个MIME Type由媒体类型(type)与子类型(subtype)组成,它们之间使用反斜杠/分割,形式如下:type/subtype

    如果我们要让一个activity能打开图片这种类型的文件,那么我们可以这样定义activity的intent-filter:

    在manifest文件里->activity 添加

    <intent-filter>
        <actionandroid:name="android.intent.action.VIEW" />
        <categoryandroid:name="android.intent.category.DEFAULT" />
        <data android:mimeType="image/jpeg ">
    </intent-filter>
    

    这样就把当前程序注册为可以打开/查看jpeg类型的图片

    当在文件管理器里点击任何jpeg文件, 系统都会试图去执行你的程序。

    " image/jpeg "这一类型属于标准的MIME Type。

    展开全文
    weixin_44008788 2021-11-30 16:34:18
  • weixin_36459547 2021-04-30 05:00:27
  • 3星
    48KB royewon 2008-01-15 20:10:54
  • weixin_36125921 2021-03-22 23:36:36
  • asdfgh0077 2019-12-26 10:41:34
  • weixin_39966909 2021-03-17 13:22:20
  • weixin_32563347 2021-06-11 00:59:04
  • u014587769 2016-04-06 14:46:18
  • dihua7808 2019-09-27 12:31:52
  • wangshubo1989 2016-03-14 21:31:17
  • walle2928 2019-03-01 10:39:02
  • weixin_39884144 2021-01-26 14:50:15
  • qq_37958845 2020-10-10 15:49:42
  • weixin_39929377 2020-12-22 19:39:46
  • michael_yt 2017-10-18 10:59:43
  • hk492103 2018-06-25 15:52:40
  • lmy0111ly 2021-10-25 11:25:00
  • shuijinglingsos 2016-06-16 13:44:45
  • weixin_30514745 2018-11-13 14:23:00
  • qq_37158147 2019-09-25 20:33:05
  • weixin_35122299 2021-04-17 02:49:58
  • weixin_30566149 2018-07-18 16:30:00

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 2,945
精华内容 1,178
关键字:

mimevcard