会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Delphi Heaven
首页
::
新随笔
::
联系
::
订阅
::
管理
公告
Content-type 的说明
Posted on
2005-05-02 19:35
delphi
阅读(
650
) 评论(
0
)
收藏
举报
Private
Function GetContentType()
Function
GetContentType(
ByVal
FileExtension
As
String
)
As
String
Select
Case
FileExtension.ToLower
Case
"
ez
"
Return
"
application/andrew-inset
"
Case
"
hqx
"
Return
"
application/mac-binhex40
"
Case
"
cpt
"
Return
"
application/mac-compactpro
"
Case
"
doc
"
Return
"
application/msword
"
Case
"
bin
"
Return
"
application/octet-stream
"
Case
"
dms
"
Return
"
application/octet-stream
"
Case
"
lha
"
Return
"
application/octet-stream
"
Case
"
lzh
"
Return
"
application/octet-stream
"
Case
"
exe
"
Return
"
application/octet-stream
"
Case
"
class
"
Return
"
application/octet-stream
"
Case
"
so
"
Return
"
application/octet-stream
"
Case
"
dll
"
Return
"
application/octet-stream
"
Case
"
oda
"
Return
"
application/oda
"
Case
"
pdf
"
Return
"
application/pdf
"
Case
"
ai
"
Return
"
application/postscript
"
Case
"
eps
"
Return
"
application/postscript
"
Case
"
ps
"
Return
"
application/postscript
"
Case
"
smi
"
Return
"
application/smil
"
Case
"
smil
"
Return
"
application/smil
"
Case
"
mif
"
Return
"
application/vnd.mif
"
Case
"
xls
"
Return
"
application/vnd.ms-excel
"
Case
"
ppt
"
Return
"
application/vnd.ms-powerpoint
"
Case
"
wbxml
"
Return
"
application/vnd.wap.wbxml
"
Case
"
wmlc
"
Return
"
application/vnd.wap.wmlc
"
Case
"
wmlsc
"
Return
"
application/vnd.wap.wmlscriptc
"
Case
"
bcpio
"
Return
"
application/x-bcpio
"
Case
"
vcd
"
Return
"
application/x-cdlink
"
Case
"
pgn
"
Return
"
application/x-chess-pgn
"
Case
"
cpio
"
Return
"
application/x-cpio
"
Case
"
csh
"
Return
"
application/x-csh
"
Case
"
dcr
"
Return
"
application/x-director
"
Case
"
dir
"
Return
"
application/x-director
"
Case
"
dxr
"
Return
"
application/x-director
"
Case
"
dvi
"
Return
"
application/x-dvi
"
Case
"
spl
"
Return
"
application/x-futuresplash
"
Case
"
gtar
"
Return
"
application/x-gtar
"
Case
"
hdf
"
Return
"
application/x-hdf
"
Case
"
js
"
Return
"
application/x-javascript
"
Case
"
skp
"
Return
"
application/x-koan
"
Case
"
skd
"
Return
"
application/x-koan
"
Case
"
skt
"
Return
"
application/x-koan
"
Case
"
skm
"
Return
"
application/x-koan
"
Case
"
latex
"
Return
"
application/x-latex
"
Case
"
nc
"
Return
"
application/x-netcdf
"
Case
"
cdf
"
Return
"
application/x-netcdf
"
Case
"
sh
"
Return
"
application/x-sh
"
Case
"
shar
"
Return
"
application/x-shar
"
Case
"
swf
"
Return
"
application/x-shockwave-flash
"
Case
"
sit
"
Return
"
application/x-stuffit
"
Case
"
sv4cpio
"
Return
"
application/x-sv4cpio
"
Case
"
sv4crc
"
Return
"
application/x-sv4crc
"
Case
"
tar
"
Return
"
application/x-tar
"
Case
"
tcl
"
Return
"
application/x-tcl
"
Case
"
tex
"
Return
"
application/x-tex
"
Case
"
texinfo
"
Return
"
application/x-texinfo
"
Case
"
texi
"
Return
"
application/x-texinfo
"
Case
"
t
"
Return
"
application/x-troff
"
Case
"
tr
"
Return
"
application/x-troff
"
Case
"
roff
"
Return
"
application/x-troff
"
Case
"
man
"
Return
"
application/x-troff-man
"
Case
"
me
"
Return
"
application/x-troff-me
"
Case
"
ms
"
Return
"
application/x-troff-ms
"
Case
"
ustar
"
Return
"
application/x-ustar
"
Case
"
src
"
Return
"
application/x-wais-source
"
Case
"
xhtml
"
Return
"
application/xhtml+xml
"
Case
"
xht
"
Return
"
application/xhtml+xml
"
Case
"
zip
"
Return
"
application/zip
"
Case
"
au
"
Return
"
audio/basic
"
Case
"
snd
"
Return
"
audio/basic
"
Case
"
mid
"
Return
"
audio/midi
"
Case
"
midi
"
Return
"
audio/midi
"
Case
"
kar
"
Return
"
audio/midi
"
Case
"
mpga
"
Return
"
audio/mpeg
"
Case
"
mp2
"
Return
"
audio/mpeg
"
Case
"
mp3
"
Return
"
audio/mpeg
"
Case
"
aif
"
Return
"
audio/x-aiff
"
Case
"
aiff
"
Return
"
audio/x-aiff
"
Case
"
aifc
"
Return
"
audio/x-aiff
"
Case
"
m3u
"
Return
"
audio/x-mpegurl
"
Case
"
ram
"
Return
"
audio/x-pn-realaudio
"
Case
"
rm
"
Return
"
audio/x-pn-realaudio
"
Case
"
rpm
"
Return
"
audio/x-pn-realaudio-plugin
"
Case
"
ra
"
Return
"
audio/x-realaudio
"
Case
"
wav
"
Return
"
audio/x-wav
"
Case
"
pdb
"
Return
"
chemical/x-pdb
"
Case
"
xyz
"
Return
"
chemical/x-xyz
"
Case
"
bmp
"
Return
"
image/bmp
"
Case
"
gif
"
Return
"
image/gif
"
Case
"
ief
"
Return
"
image/ief
"
Case
"
jpeg
"
Return
"
image/jpeg
"
Case
"
jpg
"
Return
"
image/jpeg
"
Case
"
jpe
"
Return
"
image/jpeg
"
Case
"
png
"
Return
"
image/png
"
Case
"
tiff
"
Return
"
image/tiff
"
Case
"
tif
"
Return
"
image/tiff
"
Case
"
djvu
"
Return
"
image/vnd.djvu
"
Case
"
djv
"
Return
"
image/vnd.djvu
"
Case
"
wbmp
"
Return
"
image/vnd.wap.wbmp
"
Case
"
ras
"
Return
"
image/x-cmu-raster
"
Case
"
pnm
"
Return
"
image/x-portable-anymap
"
Case
"
pbm
"
Return
"
image/x-portable-bitmap
"
Case
"
pgm
"
Return
"
image/x-portable-graymap
"
Case
"
ppm
"
Return
"
image/x-portable-pixmap
"
Case
"
rgb
"
Return
"
image/x-rgb
"
Case
"
xbm
"
Return
"
image/x-xbitmap
"
Case
"
xpm
"
Return
"
image/x-xpixmap
"
Case
"
xwd
"
Return
"
image/x-xwindowdump
"
Case
"
igs
"
Return
"
model/iges
"
Case
"
iges
"
Return
"
model/iges
"
Case
"
msh
"
Return
"
model/mesh
"
Case
"
mesh
"
Return
"
model/mesh
"
Case
"
silo
"
Return
"
model/mesh
"
Case
"
wrl
"
Return
"
model/vrml
"
Case
"
vrml
"
Return
"
model/vrml
"
Case
"
css
"
Return
"
text/css
"
Case
"
html
"
Return
"
text/html
"
Case
"
htm
"
Return
"
text/html
"
Case
"
asc
"
Return
"
text/plain
"
Case
"
txt
"
Return
"
text/plain
"
Case
"
rtx
"
Return
"
text/richtext
"
Case
"
rtf
"
Return
"
text/rtf
"
Case
"
sgml
"
Return
"
text/sgml
"
Case
"
sgm
"
Return
"
text/sgml
"
Case
"
tsv
"
Return
"
text/tab-separated-values
"
Case
"
wml
"
Return
"
text/vnd.wap.wml
"
Case
"
wmls
"
Return
"
text/vnd.wap.wmlscript
"
Case
"
etx
"
Return
"
text/x-setext
"
Case
"
xsl
"
Return
"
text/xml
"
Case
"
xml
"
Return
"
text/xml
"
Case
"
mpeg
"
Return
"
video/mpeg
"
Case
"
mpg
"
Return
"
video/mpeg
"
Case
"
mpe
"
Return
"
video/mpeg
"
Case
"
qt
"
Return
"
video/quicktime
"
Case
"
mov
"
Return
"
video/quicktime
"
Case
"
mxu
"
Return
"
video/vnd.mpegurl
"
Case
"
avi
"
Return
"
video/x-msvideo
"
Case
"
movie
"
Return
"
video/x-sgi-movie
"
Case
"
ice
"
Return
"
x-conference/x-cooltalk
"
End
Select
End Function
刷新页面
返回顶部
博客园
© 2004-2026
浙公网安备 33010602011771号
浙ICP备2021040463号-3