Static Function DocType( cExt )
Local cType
Do Case
Case Ascan( {"EXE","COM","OBJ","LIB","DLL","VBX","OCX","HLP","CHM"},cExt ) > 0
cType := "application/octet-stream; "
Case Ascan( {"ZIP","ARC","ZOO","TAR"},cExt ) > 0
cType := "application/x-zip-compressed; "
Case Ascan( {"HTM","HTML","SHT","SHTML","MHT","MHTML"},cExt ) > 0
cType := "text/html; "
Case cExt == "CSS"
cType := "text/css; "
Case Ascan( {"XML","XSL"},cExt ) > 0
cType := "text/xml; "
Case Ascan( {"TXT","TEXT","LOG","BAT"},cExt ) > 0
cType := "text/plain; "
Case cExt == "PDF"
cType := "application/pdf; "
Case Ascan( {"BMP","DIB"},cExt ) > 0
cType := "application/bmp; "
Case cExt == "GIF"
cType := "image/gif; "
Case Ascan( {"JPG","JPE","JPEG","JFI","JFIF","PJP"},cExt ) > 0
cType := "image/jpeg; "
Case Ascan( {"XLS","XLT","XLA","XLB","XLC","XLL","XLM","XLW"},cExt ) > 0
cType := "application/x-msexcel; "
Case Ascan( {"PPT","PPS","POT","PWZ"},cExt ) > 0
cType := "application/x-mspowerpoint; "
Case Ascan( {"MPG","MPE","MPEG","M1S","M1A","MP2","MPM","MPA"},cExt ) > 0
cType := "video/mpeg; "
Case Ascan( {"PIC","PICT","PCT"},cExt ) > 0
cType := "image/pict; "
Case cExt == "PNG"
cType := "image/png; "
Case Ascan( {"MOV","QT","QTL","QTS","QTX","QTIF","QDA","QDAT","QPX","QTP"},cExt ) > 0
cType := "video/quicktime; "
Case Ascan( {"TIF","TIFF"},cExt ) > 0
cType := "image/tiff; "
Case Ascan( {"AVI","VFW"},cExt ) > 0
cType := "video/avi; "
Case Ascan( {"DOC","RTF","WBK","DOT","WIZ"},cExt ) > 0
cType := "application/msword; "
Case Ascan( {"RMI","MID","WAV","CDA","MIDI","MP2","MP3","WMA","MJF","MP1","VOC","IT","XM","S3M","STM","MOD","ULT","MTM","HMI","XMI","CMF","MUS","MIZ","HMZ","MSS","GMD","MIDS","HMP"},cExt ) > 0
cType := "audio/mid; "
Otherwise
// *GD* cType := "application/x-unknown-content-type; "
cType := "application/octet-stream; "
EndCase
// ? "|"+cExt+"|",cType
Return cType