function GetMimeType(const AFileName: string): string
La fonction GetMimeType
retourne le type MIME du fichier d'après son extension.
JPG
- image/jpeg
PNG
- image/png
GIF
- image/gif
TXT
- text/plain
XML
- text/xml
PDF
- application/pdf
ZIP
- application/zip
MP3
- audio/mpeg
XLS
- application/vnd.ms-excel
DOC
- application/msword
SWF
- application/x-shockwave-flash
Dans tous les autres cas, le type retourné est application/octet-stream
.