{-------------------------------------------------------------}
{
{           cartaVox - Identificador de extensão
{
{-------------------------------------------------------------}

unit carGerat;

interface

function geraTipoAplic (nome: string): string;

implementation

{-------------------------------------------------------------}
{       Retorna o tipo de acordo com a extenção do arquivo
{-------------------------------------------------------------}

function geraTipoAplic (nome: string): string;
var ext: string;
    i: integer;
begin
    ext := '';
    if pos ('.', nome) <> 0 then
        for i := length (nome) downto 2 do
            if nome[i] = '.' then break
            else ext := upcase(nome[i]) + ext;

    if ext = '$' then  geraTipoAplic := 'text/plain'
    else if ext = '' then  geraTipoAplic := 'text/plain'
    else if ext = 'TXT' then geraTipoAplic := 'text/plain'
    else if ext = 'HTM' then geraTipoAplic := 'text/html'
    else if ext = 'HTML' then  geraTipoAplic := 'text/html'
    else if ext = 'PDF'  then geraTipoAplic := 'application/pdf'
    else if ext = 'DOCX' then geraTipoAplic := 'application/msword'
    else if ext = 'DOC' then geraTipoAplic := 'application/msword'
    else if ext = 'XLSX' then geraTipoAplic := 'application/vnd.ms-excel'
    else if ext = 'XLS' then geraTipoAplic := 'application/vnd.ms-excel'
    else if ext = 'PPSX' then geraTipoAplic := 'application/vnd.ms-powerpoint'
    else if ext = 'PPTX' then geraTipoAplic := 'application/vnd.ms-powerpoint'
    else if ext = 'PPS' then geraTipoAplic := 'application/vnd.ms-powerpoint'
    else if ext = 'PPT' then geraTipoAplic := 'application/vnd.ms-powerpoint'
    else if ext = 'RM' then geraTipoAplic := 'application/vnd.rn-realmedia'
    else if      ext = 'ZIP' then geraTipoAplic := 'application/x-zip-compressed'
    else if ext = 'BMP' then geraTipoAplic := 'image/bmp'
    else if ext = 'GIF' then geraTipoAplic := 'image/gif'
    else if ext = 'JPG' then geraTipoAplic := 'image/jpeg'
    else if ext = 'MID' then geraTipoAplic := 'audio/mid'
    else if ext = 'MP3' then geraTipoAplic := 'audio/mpeg'
    else if ext = 'WAV' then geraTipoAplic := 'audio/x-wav'
    else if ext = 'RAM' then geraTipoAplic := 'audio/x-pn-realaudio'
    else if ext = 'MPE' then geraTipoAplic := 'video/mpeg'
    else if ext = 'MPG' then geraTipoAplic := 'video/mpeg'
    else if ext = 'RTF' then geraTipoAplic := 'application/rtf'
    else if ext = 'WMV' then geraTipoAplic := 'video/x-ms-wmv'
    else if ext = 'RAR' then geraTipoAplic := 'application/x-rar-compressed'
    else if ext = '7Z' then geraTipoAplic := 'application/x-7z-compressed'
    else if ext = 'CAR' then geraTipoAplic := 'message/rfc822'
    else if ext = 'DAT' then geraTipoAplic := 'application/ms-tnef'
    else if ext = 'EXE' then geraTipoAplic := 'application/octet-stream'
    else if ext = 'EVY' then geraTipoAplic := 'application/envoy'
    else if ext = 'FIF' then geraTipoAplic := 'application/fractals'
    else if ext = 'SPL' then geraTipoAplic := 'application/futuresplash'
    else if ext = 'HTA' then geraTipoAplic := 'application/hta'
    else if ext = 'ACX' then geraTipoAplic := 'application/internet-property -stream'
    else if ext = 'HQX' then geraTipoAplic := 'application/mac-binhex40'
    else if ext = 'DOT' then geraTipoAplic := 'application/msword'
    else if ext = 'BIN' then geraTipoAplic := 'application/octet-stream'
    else if ext = 'CLASS' then geraTipoAplic := 'application/octet-stream'
    else if ext = 'DMS' then geraTipoAplic := 'application/octet-stream'
    else if ext = 'LHA' then geraTipoAplic := 'application/octet-stream'
    else if ext = 'LZH' then geraTipoAplic := 'application/octet-stream'
    else if ext = 'ODA' then geraTipoAplic := 'application/oda'
    else if ext = 'AXS' then geraTipoAplic := 'application/olescript'
    else if ext = 'PRF' then geraTipoAplic := 'application/pics-rules'
    else if ext = 'P10' then geraTipoAplic := 'application/pkcs10'
    else if ext = 'CRL' then geraTipoAplic := 'application/pkix-crl'
    else if ext = 'AI' then geraTipoAplic := 'application/postscript'
    else if ext = 'EPS' then geraTipoAplic := 'application/postscript'
    else if ext = 'PS' then geraTipoAplic := 'application/postscript'
    else if ext = 'SETPAY' then geraTipoAplic := 'application/set-payment-initiation'
    else if ext = 'SETREG' then geraTipoAplic := 'application/set-registration-initiation'
    else if ext = 'XLA' then geraTipoAplic := 'application/vnd.ms-excel'
    else if ext = 'XLC' then geraTipoAplic := 'application/vnd.ms-excel'
    else if ext = 'XLM' then geraTipoAplic := 'application/vnd.ms-excel'
    else if ext = 'XLT' then geraTipoAplic := 'application/vnd.ms-excel'
    else if ext = 'XLW' then geraTipoAplic := 'application/vnd.ms-excel'
    else if ext = 'SST' then geraTipoAplic := 'application/vnd.ms-pkicertstore'
    else if ext = 'CAT' then geraTipoAplic := 'application/vnd.ms-pkiseccat'
    else if ext = 'STL' then geraTipoAplic := 'application/vnd.ms-pkistl'
    else if ext = 'POT' then geraTipoAplic := 'application/vnd.ms-powerpoint'
    else if ext = 'MPP' then geraTipoAplic := 'application/vnd.ms-project'
    else if ext = 'WCM' then geraTipoAplic := 'application/vnd.ms-works'
    else if ext = 'WDB' then geraTipoAplic := 'application/vnd.ms-works'
    else if ext = 'WKS' then geraTipoAplic := 'application/vnd.ms-works'
    else if ext = 'WPS' then geraTipoAplic := 'application/vnd.ms-works'
    else if ext = 'HLP' then geraTipoAplic := 'application/winhlp'
    else if ext = 'BCPIO' then geraTipoAplic := 'pplication/x-bcpio'
    else if ext = 'CDF' then geraTipoAplic := 'application/x-cdf'
    else if ext = 'Z' then geraTipoAplic := 'application/x-compressed'
    else if ext = 'TGZ' then geraTipoAplic := 'application/x-compressed'
    else if ext = 'CPIO' then geraTipoAplic := 'application/x-cpio'
    else if ext = 'CSH' then geraTipoAplic := 'application/x-csh'
    else if ext = 'DCR' then geraTipoAplic := 'application/x-director'
    else if ext = 'DIR' then geraTipoAplic := 'application/x-director'
    else if ext = 'DXR' then geraTipoAplic := 'application/x-director'
    else if ext = 'DVI' then geraTipoAplic := 'application/x-dvi'
    else if ext = 'GTAR' then geraTipoAplic := 'application/x-gtar'
    else if ext = 'GZ' then geraTipoAplic := 'application/x-gzip'
    else if ext = 'HDF' then geraTipoAplic := 'application/x-hdf'
    else if ext = 'INS' then geraTipoAplic := 'application/x-internet-signup'
    else if ext = 'ISP' then geraTipoAplic := 'application/x-internet-signup'
    else if ext = 'III' then geraTipoAplic := 'application/x-iphone'
    else if ext = 'JS' then geraTipoAplic := 'application/x-javascript'
    else if ext = 'LATEX' then geraTipoAplic := 'application/x-latex'
    else if ext = 'MDB' then geraTipoAplic := 'application/x-msaccess'
    else if ext = 'CRD' then geraTipoAplic := 'application/x-mscardfile'
    else if ext = 'CLP' then geraTipoAplic := 'application/x-msclip'
    else if ext = 'DLL' then geraTipoAplic := 'application/x-msdownload'
    else if ext = 'M13' then geraTipoAplic := 'application/x-msmediaview'
    else if ext = 'M14' then geraTipoAplic := 'application/x-msmediaview'
    else if ext = 'MVB' then geraTipoAplic := 'application/x-msmediaview'
    else if ext = 'WMF' then geraTipoAplic := 'application/x-msmetafile'
    else if ext = 'MNY' then geraTipoAplic := 'application/x-msmoney'
    else if ext = 'PUB' then geraTipoAplic := 'application/x-mspublisher'
    else if ext = 'SCD' then geraTipoAplic := 'application/x-msschedule'
    else if ext = 'TRM' then geraTipoAplic := 'application/x-msterminal'
    else if ext = 'WRI' then geraTipoAplic := 'application/x-mswrite'
    else if ext = 'NC' then geraTipoAplic := 'application/x-netcdf'
    else if ext = 'PMA' then geraTipoAplic := 'application/x-perfmon'
    else if ext = 'PMC' then geraTipoAplic := 'application/x-perfmon'
    else if ext = 'PML' then geraTipoAplic := 'application/x-perfmon'
    else if ext = 'PMR' then geraTipoAplic := 'application/x-perfmon'
    else if ext = 'PMW' then geraTipoAplic := 'application/x-perfmon'
    else if ext = 'P12' then geraTipoAplic := 'application/x-pkcs12'
    else if ext = 'PFX' then geraTipoAplic := 'application/x-pkcs12'
    else if ext = 'P7B' then geraTipoAplic := 'application/x-pkcs7-certificates'
    else if ext = 'SPC' then geraTipoAplic := 'application/x-pkcs7-certificates'
    else if ext = 'P7R' then geraTipoAplic := 'application/x-pkcs7-certreqresp'
    else if ext = 'P7C' then geraTipoAplic := 'application/x-pkcs7-mime'
    else if ext = 'P7M' then geraTipoAplic := 'application/x-pkcs7-mime'
    else if ext = 'P7S' then geraTipoAplic := 'application/x-pkcs7-signature'
    else if ext = 'SH' then geraTipoAplic := 'application/x-sh'
    else if ext = 'SHAR' then geraTipoAplic := 'application/x-shar'
    else if ext = 'SIT' then geraTipoAplic := 'application/x-stuffit'
    else if ext = 'SV4CPIO' then geraTipoAplic := 'application/x-sv4cpio'
    else if ext = 'SV4CRC' then geraTipoAplic := 'application/x-sv4crc'
    else if ext = 'TAR' then geraTipoAplic := 'application/x-tar'
    else if ext = 'TCL' then geraTipoAplic := 'application/x-tcl'
    else if ext = 'TEX' then geraTipoAplic := 'application/x-tex'
    else if ext = 'TEXI' then geraTipoAplic := 'application/x-texinfo'
    else if ext = 'TEXINFO' then geraTipoAplic := 'application/x-texinfo'
    else if ext = 'ROFF' then geraTipoAplic := 'application/x-troff'
    else if ext = 'T' then geraTipoAplic := 'application/x-troff'
    else if ext = 'TR' then geraTipoAplic := 'application/x-troff'
    else if ext = 'MAN' then geraTipoAplic := 'application/x-troff-man'
    else if ext = 'ME' then geraTipoAplic := 'application/x-troff-me'
    else if ext = 'MS' then geraTipoAplic := 'application/x-troff-ms'
    else if ext = 'USTAR' then geraTipoAplic := 'application/x-ustar'
    else if ext = 'SRC' then geraTipoAplic := 'application/x-wais-source'
    else if ext = 'CER' then geraTipoAplic := 'application/x-x509-ca-cert'
    else if ext = 'CRT' then geraTipoAplic := 'application/x-x509-ca-cert'
    else if ext = 'DER' then geraTipoAplic := 'application/x-x509-ca-cert'
    else if ext = 'PKO' then geraTipoAplic := 'application/ynd.ms-pkipko'
    else if ext = 'AU' then geraTipoAplic := 'audio/basic'
    else if ext = 'SND' then geraTipoAplic := 'audio/basic'
    else if ext = 'RMI' then geraTipoAplic := 'audio/mid'
    else if ext = 'AIF' then geraTipoAplic := 'audio/x-aiff'
    else if ext = 'AIFC' then geraTipoAplic := 'audio/x-aiff'
    else if ext = 'AIFF' then geraTipoAplic := 'audio/x-aiff'
    else if ext = 'M3U' then geraTipoAplic := 'audio/x-mpegurl'
    else if ext = 'RA' then geraTipoAplic := 'audio/x-pn-realaudio'
    else if ext = 'COD' then geraTipoAplic := 'image/cis-cod'
    else if ext = 'IEF' then geraTipoAplic := 'image/ief'
    else if ext = 'JPE' then geraTipoAplic := 'image/jpeg'
    else if ext = 'JPEG' then geraTipoAplic := 'image/jpeg'
    else if ext = 'JFIF' then geraTipoAplic := 'image/pipeg'
    else if ext = 'TIF' then geraTipoAplic := 'image/tiff'
    else if ext = 'TIFF' then geraTipoAplic := 'image/tiff'
    else if ext = 'RAS' then geraTipoAplic := 'image/x-cmu-raster'
    else if ext = 'CMX' then geraTipoAplic := 'image/x-cmx'
    else if ext = 'ICO' then geraTipoAplic := 'image/x-icon'
    else if ext = 'PNM' then geraTipoAplic := 'image/x-portable-anymap'
    else if ext = 'PBM' then geraTipoAplic := 'image/x-portable-bitmap'
    else if ext = 'PGM' then geraTipoAplic := 'image/x-portable-graymap'
    else if ext = 'PPM' then geraTipoAplic := 'image/x-portable-pixmap'
    else if ext = 'RGB' then geraTipoAplic := 'image/x-rgb'
    else if ext = 'XBM' then geraTipoAplic := 'image/x-xbitmap'
    else if ext = 'XPM' then geraTipoAplic := 'image/x-xpixmap'
    else if ext = 'XWD' then geraTipoAplic := 'image/x-xwindowdump'
    else if ext = 'MHT' then geraTipoAplic := 'message/rfc822'
    else if ext = 'MHTML' then geraTipoAplic := 'message/rfc822'
    else if ext = 'NWS' then geraTipoAplic := 'message/rfc822'
    else if ext = 'CSS' then geraTipoAplic := 'text/css'
    else if ext = '323' then geraTipoAplic := 'text/h323'
    else if ext = 'STM' then geraTipoAplic := 'text/html'
    else if ext = 'ULS' then geraTipoAplic := 'text/iuls'
    else if ext = 'BAS' then geraTipoAplic := 'text/plain'
    else if ext = 'CMD' then geraTipoAplic := 'text/plain'
    else if ext = 'DPR' then geraTipoAplic := 'text/plain'
    else if ext = 'PAS' then geraTipoAplic := 'text/plain'
    else if ext = 'C' then geraTipoAplic := 'text/plain'
    else if ext = 'H' then geraTipoAplic := 'text/plain'
    else if ext = 'RTX' then geraTipoAplic := 'text/richtext'
    else if ext = 'SCT' then geraTipoAplic := 'text/scriptlet'
    else if ext = 'TSV' then geraTipoAplic := 'text/tab-separated-values'
    else if ext = 'HTT' then geraTipoAplic := 'text/webviewhtml'
    else if ext = 'HTC' then geraTipoAplic := 'text/x-component'
    else if ext = 'ETX' then geraTipoAplic := 'text/x-setext'
    else if ext = 'VCF' then geraTipoAplic := 'text/x-vcard'
    else if ext = 'MP2' then geraTipoAplic := 'video/mpeg'
    else if ext = 'MPA' then geraTipoAplic := 'video/mpeg'
    else if ext = 'MPEG' then geraTipoAplic := 'video/mpeg'
    else if ext = 'MPV2' then geraTipoAplic := 'video/mpeg'
    else if ext = 'MOV' then geraTipoAplic := 'video/quicktime'
    else if ext = 'QT' then geraTipoAplic := 'video/quicktime'
    else if ext = 'LSF' then geraTipoAplic := 'video/x-la-asf'
    else if ext = 'LSX' then geraTipoAplic := 'video/x-la-asf'
    else if ext = 'ASF' then geraTipoAplic := 'video/x-ms-asf'
    else if ext = 'ASR' then geraTipoAplic := 'video/x-ms-asf'
    else if ext = 'ASX' then geraTipoAplic := 'video/x-ms-asf'
    else if ext = 'AVI' then geraTipoAplic := 'video/x-msvideo'
    else if ext = 'MOVIE' then geraTipoAplic := 'video/x-sgi-movie'
    else if ext = 'FLR' then geraTipoAplic := 'x-world/x-vrml'
    else if ext = 'VRML' then geraTipoAplic := 'x-world/x-vrml'
    else if ext = 'WRL' then geraTipoAplic := 'x-world/x-vrml'
    else if ext = 'WRZ' then geraTipoAplic := 'x-world/x-vrml'
    else if ext = 'XAF' then geraTipoAplic := 'x-world/x-vrml'
    else if ext = 'XOF' then geraTipoAplic := 'x-world/x-vrml'
    else if ext = 'AAC' then geraTipoAplic := 'audio/aac'
    else if ext = 'BAT' then geraTipoAplic := 'application/x-bat'
    else if ext = 'BBB' then geraTipoAplic := 'application/x-mudarextensaopara-bat'
    else if ext = 'DIV' then geraTipoAplic := 'video/divx'
    else if ext = 'DIVX' then geraTipoAplic := 'video/divx'
    else if ext = 'DOTX' then geraTipoAplic := 'application/vnd.openxmlformats-officedocument.wordprocessingml.template'
    else if ext = 'EML' then geraTipoAplic := 'message/rfc822'
    else if ext = 'EPUB' then geraTipoAplic := 'application/epub+zip'
    else if ext = 'FLV' then geraTipoAplic := 'video/x-flv'
    else if ext = 'LOG' then geraTipoAplic := 'text/plain'
    else if ext = 'MP4' then geraTipoAplic := 'video/mp4'
    else if ext = 'PHP' then geraTipoAplic := 'application/x-php'
    else if ext = 'PNG' then geraTipoAplic := 'image/png'
    else if ext = 'PRO' then geraTipoAplic := 'application/x-pro'
    else if ext = 'RRR' then geraTipoAplic := 'application/x-rar-compressed'
    else if ext = 'WMA' then geraTipoAplic := 'audio/x-ms-wma'
    else if ext = '3G2' then geraTipoAplic := 'video/3gpp'
    else if ext = '3GP' then geraTipoAplic := 'video/3gpp'
    else if ext = 'A2K' then geraTipoAplic := 'application/x-cdk2kaudio'
    else if ext = 'AA' then geraTipoAplic := 'audio/audible'
    else if ext = 'AAA' then geraTipoAplic := 'application/x-aa0data'
    else if ext = 'AAB' then geraTipoAplic := 'application/x-authorware-bin'
    else if ext = 'AAM' then geraTipoAplic := 'application/x-authorware-map'
    else if ext = 'ABDATA' then geraTipoAplic := 'text/plain'
    else if ext = 'ABW' then geraTipoAplic := 'application/abiword'
    else if ext = 'AC3' then geraTipoAplic := 'audio/ac3'
    else if ext = 'ACCDA' then geraTipoAplic := 'application/msaccess'
    else if ext = 'ACCDB' then geraTipoAplic := 'application/msaccess'
    else if ext = 'ACCDC' then geraTipoAplic := 'application/msaccess'
    else if ext = 'ACCDE' then geraTipoAplic := 'application/msaccess'
    else if ext = 'ACCDR' then geraTipoAplic := 'application/msaccess.runtime'
    else if ext = 'ACCDT' then geraTipoAplic := 'application/msaccess'
    else if ext = 'ACCDW' then geraTipoAplic := 'application/msaccess.webapplication'
    else if ext = 'ACCFT' then geraTipoAplic := 'application/msaccess.ftemplate'
    else if ext = 'ACE' then geraTipoAplic := 'application/x-compressed'
    else if ext = 'ACP' then geraTipoAplic := 'audio/x-mei-aac'
    else if ext = 'ACROBATSECURITYSETTINGS' then geraTipoAplic := 'application/vnd.adobe.acrobat-security-settings'
    else if ext = 'ACSM' then geraTipoAplic := 'application/vnd.adobe.adept+xml'
    else if ext = 'ACT' then geraTipoAplic := 'text/xml'
    else if ext = 'ACTPROJ' then geraTipoAplic := 'text/plain'
    else if ext = 'AD' then geraTipoAplic := 'text/plain'
    else if ext = 'ADDIN' then geraTipoAplic := 'text/xml'
    else if ext = 'ADE' then geraTipoAplic := 'application/msaccess'
    else if ext = 'ADOBEBRIDGE' then geraTipoAplic := 'application/x-bridge-url'
    else if ext = 'ADP' then geraTipoAplic := 'application/msaccess'
    else if ext = 'ADT' then geraTipoAplic := 'audio/vnd.dlna.adts'
    else if ext = 'ADTS' then geraTipoAplic := 'audio/aac'
    else if ext = 'AMC' then geraTipoAplic := 'application/x-mpeg'
    else if ext = 'AMR' then geraTipoAplic := 'audio/amr'
    else if ext = 'APPLICATION' then geraTipoAplic := 'application/x-ms-application'
    else if ext = 'ART' then geraTipoAplic := 'image/x-jg'
    else if ext = 'ASA' then geraTipoAplic := 'application/xml'
    else if ext = 'ASAX' then geraTipoAplic := 'application/xml'
    else if ext = 'ASCX' then geraTipoAplic := 'application/xml'
    else if ext = 'ASHX' then geraTipoAplic := 'application/xml'
    else if ext = 'ASM' then geraTipoAplic := 'text/plain'
    else if ext = 'ASMX' then geraTipoAplic := 'application/xml'
    else if ext = 'ASP' then geraTipoAplic := 'application/x-asp'
    else if ext = 'ASPX' then geraTipoAplic := 'application/xml'
    else if ext = 'ASWCS' then geraTipoAplic := 'application/avast-aswcs'
    else if ext = 'ASWS' then geraTipoAplic := 'application/avast-asws'
    else if ext = 'AWF' then geraTipoAplic := 'application/vnd.adobe.workflow'
    else if ext = 'BCF' then geraTipoAplic := 'application/vnd.belarc-cf'
    else if ext = 'BCI' then geraTipoAplic := 'application/vnd.belarc-bci'
    else if ext = 'BDSGROUP' then geraTipoAplic := 'text/plain'
    else if ext = 'BDSPROJ' then geraTipoAplic := 'text/plain'
    else if ext = 'BIZ' then geraTipoAplic := 'text/xml'
    else if ext = 'BLOGTHIS' then geraTipoAplic := 'application/x-blogthis'
    else if ext = 'BMO' then geraTipoAplic := 'audio/blue-matter-offer'
    else if ext = 'BMR' then geraTipoAplic := 'text/blue-matter-content-ref'
    else if ext = 'BMT' then geraTipoAplic := 'audio/blue-matter-song'
    else if ext = 'BPP' then geraTipoAplic := 'application/x-mmjb-bpp'
    else if ext = 'BTSEARCH' then geraTipoAplic := 'application/x-bittorrentsearchdescription+xml'
    else if ext = 'BUB' then geraTipoAplic := 'application/photobubble'
    else if ext = 'BWP' then geraTipoAplic := 'application/x-bwpreview'
    else if ext = 'DB' then geraTipoAplic := 'application/x-sqlite3'
    else if ext = 'DBPROJ' then geraTipoAplic := 'text/plain'
    else if ext = 'DBS' then geraTipoAplic := 'text/plain'
    else if ext = 'DCD' then geraTipoAplic := 'text/xml'
    else if ext = 'DD' then geraTipoAplic := 'text/plain'
    else if ext = 'DEC' then geraTipoAplic := 'text/plain'
    else if ext = 'DEF' then geraTipoAplic := 'text/plain'
    else if ext = 'DIA' then geraTipoAplic := 'application/dia'
    else if ext = 'DIB' then geraTipoAplic := 'image/x-bmp'
    else if ext = 'DIF' then geraTipoAplic := 'video/x-dv'
    else if ext = 'DISCO' then geraTipoAplic := 'text/xml'
    else if ext = 'DLM' then geraTipoAplic := 'text/dlm'
    else if ext = 'DPG' then geraTipoAplic := 'application/vnd.dpgraph'
    else if ext = 'DPGRAPH' then geraTipoAplic := 'application/vnd.dpgraph'
    else if ext = 'DPK' then geraTipoAplic := 'text/plain'
    else if ext = 'DPKW' then geraTipoAplic := 'text/plain'
    else if ext = 'DSP' then geraTipoAplic := 'text/plain'
    else if ext = 'DSPROTOTYPE' then geraTipoAplic := 'text/plain'
    else if ext = 'DSW' then geraTipoAplic := 'text/plain'
    else if ext = 'DTD' then geraTipoAplic := 'application/xml-dtd'
    else if ext = 'DTSCONFIG' then geraTipoAplic := 'text/xml'
    else if ext = 'DV' then geraTipoAplic := 'video/x-dv'
    else if ext = 'DWF' then geraTipoAplic := 'model/vnd.dwf'
    else if ext = 'DWFX' then geraTipoAplic := 'model/vnd.dwfx+xps'
    else if ext = 'EASMX' then geraTipoAplic := 'model/vnd.easmx+xps'
    else if ext = 'EDN' then geraTipoAplic := 'application/vnd.adobe.edn'
    else if ext = 'EDRWX' then geraTipoAplic := 'model/vnd.edrwx+xps'
    else if ext = 'EMM' then geraTipoAplic := 'application/x-emms-content'
    else if ext = 'ENEWS' then geraTipoAplic := 'application/x-mobipocket-subscription'
    else if ext = 'EPRTX' then geraTipoAplic := 'model/vnd.eprtx+xps'
    else if ext = 'ETA' then geraTipoAplic := 'application/earthviewer'
    else if ext = 'ETD' then geraTipoAplic := 'application/x-ebx'
    else if ext = 'ETP' then geraTipoAplic := 'text/plain'
    else if ext = 'EVR' then geraTipoAplic := 'audio/evrc-qcp'
    else if ext = 'EVRC' then geraTipoAplic := 'audio/evrc-qcp'
    else if ext = 'EXT' then geraTipoAplic := 'text/plain'
    else if ext = 'F4V' then geraTipoAplic := 'video/x-f4v'
    else if ext = 'FDF' then geraTipoAplic := 'application/vnd.fdf'
    else if ext = 'FKY' then geraTipoAplic := 'text/plain'
    else if ext = 'FLC' then geraTipoAplic := 'video/flc'
    else if ext = 'FLI' then geraTipoAplic := 'video/flc'
    else if ext = 'FLW' then geraTipoAplic := 'application/x-letter-creator'
    else if ext = 'FML' then geraTipoAplic := 'application/file-mirror-list'
    else if ext = 'FO' then geraTipoAplic := 'text/xml'
    else if ext = 'FPX' then geraTipoAplic := 'image/x-xbitmap'
    else if ext = 'FS' then geraTipoAplic := 'application/x-powercam-fs'
    else if ext = 'G2K' then geraTipoAplic := 'application/x-cdkgameinstall'
    else if ext = 'GENERICTEST' then geraTipoAplic := 'application/xml'
    else if ext = 'GG' then geraTipoAplic := 'app/gg'
    else if ext = 'GGC' then geraTipoAplic := 'app/ggc'
    else if ext = 'GPS' then geraTipoAplic := 'application/x-gom-skin'
    else if ext = 'GROUP' then geraTipoAplic := 'text/x-ms-group'
    else if ext = 'GRV' then geraTipoAplic := 'application/vnd.groove-injector'
    else if ext = 'GS' then geraTipoAplic := 'text/plain'
    else if ext = 'GSM' then geraTipoAplic := 'audio/x-gsm'
    else if ext = 'I' then geraTipoAplic := 'text/plain'
    else if ext = 'IAD' then geraTipoAplic := 'application/x-iad'
    else if ext = 'IBE' then geraTipoAplic := 'application/ibe'
    else if ext = 'ICA' then geraTipoAplic := 'application/x-ica'
    else if ext = 'ICS' then geraTipoAplic := 'text/calendar'
    else if ext = 'IDL' then geraTipoAplic := 'text/plain'
    else if ext = 'IMA' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'IMC' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'IME' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'IMF' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'IMI' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'IMK' then geraTipoAplic := 'application/x-incredimail-license'
    else if ext = 'IMN' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'IMS' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'IMW' then geraTipoAplic := 'application/x-incredimail'
    else if ext = 'INC' then geraTipoAplic := 'text/plain'
    else if ext = 'INFOPATHXML' then geraTipoAplic := 'application/ms-infopath.xml'
    else if ext = 'INL' then geraTipoAplic := 'text/plain'
    else if ext = 'IPA' then geraTipoAplic := 'application/x-itunes-ipa'
    else if ext = 'IPG' then geraTipoAplic := 'application/x-itunes-ipg'
    else if ext = 'IPPROJ' then geraTipoAplic := 'text/plain'
    else if ext = 'IPS' then geraTipoAplic := 'application/x-ipscript'
    else if ext = 'IPSW' then geraTipoAplic := 'application/x-itunes-ipsw'
    else if ext = 'IPX' then geraTipoAplic := 'application/x-ipix'
    else if ext = 'IQY' then geraTipoAplic := 'text/x-ms-iqy'
    else if ext = 'ITB' then geraTipoAplic := 'application/x-itunes-itb'
    else if ext = 'ITE' then geraTipoAplic := 'application/x-itunes-ite'
    else if ext = 'ITI' then geraTipoAplic := 'application/iti'
    else if ext = 'ITLP' then geraTipoAplic := 'application/x-itunes-itlp'
    else if ext = 'ITLS' then geraTipoAplic := 'application/x-itunes-itls'
    else if ext = 'ITMS' then geraTipoAplic := 'application/x-itunes-itms'
    else if ext = 'ITPC' then geraTipoAplic := 'application/x-itunes-itpc'
    else if ext = 'IVF' then geraTipoAplic := 'video/x-ivf'
    else if ext = 'IVR' then geraTipoAplic := 'i-world/i-vrml'
    else if ext = 'JAD' then geraTipoAplic := 'text/vnd.sun.j2me.app-descriptor'
    else if ext = 'JAVA' then geraTipoAplic := 'text/java'
    else if ext = 'JIAF' then geraTipoAplic := 'application/x-jiafilm-download'
    else if ext = 'JIAS' then geraTipoAplic := 'application/x-jiafilm-vod'
    else if ext = 'JNLP' then geraTipoAplic := 'application/x-java-jnlp-file'
    else if ext = 'JTX' then geraTipoAplic := 'application/x-jtx+xps'
    else if ext = 'KCI' then geraTipoAplic := 'text/plain'
    else if ext = 'KML' then geraTipoAplic := 'application/vnd.google-earth.kml+xml'
    else if ext = 'KMZ' then geraTipoAplic := 'application/vnd.google-earth.kmz'
    else if ext = 'LA1' then geraTipoAplic := 'audio/x-liquid-file'
    else if ext = 'LAR' then geraTipoAplic := 'application/x-laplayer-reg'
    else if ext = 'LAV' then geraTipoAplic := 'audio/x-liquid'
    else if ext = 'LAVS' then geraTipoAplic := 'audio/x-liquid-secure'
    else if ext = 'LDD' then geraTipoAplic := 'text/plain'
    else if ext = 'LGN' then geraTipoAplic := 'text/plain'
    else if ext = 'LIBRARY-MS' then geraTipoAplic := 'application/windows-library+xml'
    else if ext = 'LKS' then geraTipoAplic := 'application/x-lk-rlestream'
    else if ext = 'LMSFF' then geraTipoAplic := 'audio/x-la-lms'
    else if ext = 'LOADTEST' then geraTipoAplic := 'application/xml'
    else if ext = 'LPM' then geraTipoAplic := 'text/plain'
    else if ext = 'LPT' then geraTipoAplic := 'text/plain'
    else if ext = 'LQT' then geraTipoAplic := 'audio/x-liquid-file'
    else if ext = 'LS' then geraTipoAplic := 'application/x-javascript'
    else if ext = 'LSAPROTOTYPE' then geraTipoAplic := 'text/plain'
    else if ext = 'LST' then geraTipoAplic := 'text/plain'
    else if ext = 'LTW' then geraTipoAplic := 'application/x-letter-creator'
    else if ext = 'M1V' then geraTipoAplic := 'video/x-mpeg'
    else if ext = 'M2P' then geraTipoAplic := 'video/mpeg'
    else if ext = 'M2T' then geraTipoAplic := 'video/mpeg'
    else if ext = 'M2TS' then geraTipoAplic := 'video/mpeg'
    else if ext = 'M2V' then geraTipoAplic := 'video/x-mpeg'
    else if ext = 'M4A' then geraTipoAplic := 'audio/x-m4a'
    else if ext = 'M4B' then geraTipoAplic := 'audio/x-m4b'
    else if ext = 'M4E' then geraTipoAplic := 'video/mpeg4'
    else if ext = 'M4P' then geraTipoAplic := 'audio/x-m4p'
    else if ext = 'M4R' then geraTipoAplic := 'audio/x-m4r'
    else if ext = 'M4V' then geraTipoAplic := 'video/x-m4v'
    else if ext = 'MAC' then geraTipoAplic := 'image/x-macpaint'
    else if ext = 'MAK' then geraTipoAplic := 'text/plain'
    else if ext = 'MAP' then geraTipoAplic := 'text/plain'
    else if ext = 'MASTER' then geraTipoAplic := 'application/xml'
    else if ext = 'MBC' then geraTipoAplic := 'application/x-pn-virtualink'
    else if ext = 'MBO' then geraTipoAplic := 'application/x-previewsystems-vbox-music'
    else if ext = 'MBOX' then geraTipoAplic := 'application/x-previewsystems-vbox-music'
    else if ext = 'MBPKG' then geraTipoAplic := 'application/x-mobipocket-mobipackage'
    else if ext = 'MDA' then geraTipoAplic := 'application/msaccess'
    else if ext = 'MDE' then geraTipoAplic := 'application/msaccess'
    else if ext = 'MDP' then geraTipoAplic := 'text/plain'
    else if ext = 'MFP' then geraTipoAplic := 'application/x-shockwave-flash'
    else if ext = 'MIX' then geraTipoAplic := 'image/x-xbitmap'
    else if ext = 'MJF' then geraTipoAplic := 'audio/x-vnd.AudioExplosion.MjuiceMediaFile'
    else if ext = 'MJV' then geraTipoAplic := 'audio/audio/mjuice_voucher'
    else if ext = 'MK' then geraTipoAplic := 'text/plain'
    else if ext = 'MKA' then geraTipoAplic := 'audio/x-matroska'
    else if ext = 'MKV' then geraTipoAplic := 'video/x-matroska'
    else if ext = 'MMAP' then geraTipoAplic := 'application/vnd.mindjet.mindmanager'
    else if ext = 'MMAS' then geraTipoAplic := 'application/vnd.mindjet.mindmanager'
    else if ext = 'MMAT' then geraTipoAplic := 'application/vnd.mindjet.mindmanager'
    else if ext = 'MMBAS' then geraTipoAplic := 'text/plain'
    else if ext = 'MMJB' then geraTipoAplic := 'application/x-mmjb-mmjb'
    else if ext = 'MMJB_MIME' then geraTipoAplic := 'application/x-musicmatch-mmjb5.20detect'
    else if ext = 'MMMP' then geraTipoAplic := 'application/vnd.mindjet.mindmanager'
    else if ext = 'MMMS' then geraTipoAplic := 'application/vnd.mindjet.mindmanager'
    else if ext = 'MMO' then geraTipoAplic := 'application/x-mmjb-mmo'
    else if ext = 'MMZ' then geraTipoAplic := 'application/x-mmjb-mmz'
    else if ext = 'MOBI' then geraTipoAplic := 'application/x-mobipocket-mobibook'
    else if ext = 'MOCHA' then geraTipoAplic := 'application/x-javascript'
    else if ext = 'MOD' then geraTipoAplic := 'video/mpeg'
    else if ext = 'MP1' then geraTipoAplic := 'audio/mp1'
    else if ext = 'MPK' then geraTipoAplic := 'application\x-intertrust-mpk'
    else if ext = 'MPS' then geraTipoAplic := 'video/x-mpeg'
    else if ext = 'MPV' then geraTipoAplic := 'video/mpg'
    else if ext = 'MPV4' then geraTipoAplic := 'video/mpeg'
    else if ext = 'MQV' then geraTipoAplic := 'video/quicktime'
    else if ext = 'MTX' then geraTipoAplic := 'application/xml'
    else if ext = 'MUS' then geraTipoAplic := 'application/x-finale-music-notation'
    else if ext = 'MWC' then geraTipoAplic := 'application/vnd.dpgraph'
    else if ext = 'MXP' then geraTipoAplic := 'application/x-mmxp'
    else if ext = 'NMW' then geraTipoAplic := 'application/nmwb'
    else if ext = 'NPI' then geraTipoAplic := 'application/x-pn-npistream'
    else if ext = 'NTW' then geraTipoAplic := 'application/x-itaxirc-data'
    else if ext = 'NTX' then geraTipoAplic := 'application/x-itaxirc-data'
    else if ext = 'NTY' then geraTipoAplic := 'application/x-itaxirc-data'
    else if ext = 'ODC' then geraTipoAplic := 'text/x-ms-odc'
    else if ext = 'ODF' then geraTipoAplic := 'application/vnd.oasis.openDOCUMENT.formula'
    else if ext = 'ODG' then geraTipoAplic := 'application/vnd.oasis.opendocument.graphics'
    else if ext = 'ODH' then geraTipoAplic := 'text/plain'
    else if ext = 'ODL' then geraTipoAplic := 'text/plain'
    else if ext = 'ODP' then geraTipoAplic := 'application/vnd.oasis.opendocument.presentation'
    else if ext = 'ODS' then geraTipoAplic := 'application/vnd.oasis.opendocument.spreadsheet'
    else if ext = 'ODT' then geraTipoAplic := 'application/vnd.oasis.opendocument.text'
    else if ext = 'OFC' then geraTipoAplic := 'text/ofc'
    else if ext = 'OFX' then geraTipoAplic := 'text/ofx'
    else if ext = 'OGG' then geraTipoAplic := 'video/x-ogg'
    else if ext = 'OGM' then geraTipoAplic := 'video/x-ogm'
    else if ext = 'ONE' then geraTipoAplic := 'application/msonenote'
    else if ext = 'ONEPKG' then geraTipoAplic := 'application/msonenote'
    else if ext = 'ORDEREDTEST' then geraTipoAplic := 'application/xml'
    else if ext = 'OSDX' then geraTipoAplic := 'application/opensearchdescription+xml'
    else if ext = 'OTG' then geraTipoAplic := 'application/vnd.oasis.opendocument.graphics-template'
    else if ext = 'OTP' then geraTipoAplic := 'application/vnd.oasis.opendocument.presentation-template'
    else if ext = 'OTS' then geraTipoAplic := 'application/vnd.oasis.opendocument.spreadsheet-template'
    else if ext = 'OVA' then geraTipoAplic := 'application/x-virtualbox-ova'
    else if ext = 'OVF' then geraTipoAplic := 'application/x-virtualbox-ovf'
    else if ext = 'OXT' then geraTipoAplic := 'application/vnd.openofficeorg.extension'
    else if ext = 'PANDO' then geraTipoAplic := 'application/x-pando'
    else if ext = 'PCAST' then geraTipoAplic := 'application/x-podcast'
    else if ext = 'PCIF' then geraTipoAplic := 'text/pcif'
    else if ext = 'PCT' then geraTipoAplic := 'image/pict'
    else if ext = 'PDX' then geraTipoAplic := 'application/vnd.adobe.pdx'
    else if ext = 'PHP3' then geraTipoAplic := 'application/x-php3'
    else if ext = 'PHP4' then geraTipoAplic := 'application/x-php4'
    else if ext = 'PIC' then geraTipoAplic := 'image/pict'
    else if ext = 'PICT' then geraTipoAplic := 'image/pict'
    else if ext = 'PINSTALL' then geraTipoAplic := 'application/x-picasa-detect'
    else if ext = 'PKINFO' then geraTipoAplic := 'application/octet-stream'
    else if ext = 'PL' then geraTipoAplic := 'application/x-perl'
    else if ext = 'PLG' then geraTipoAplic := 'text/html'
    else if ext = 'PLS' then geraTipoAplic := 'audio/x-scpls'
    else if ext = 'PMF' then geraTipoAplic := 'application/x-compressed'
    else if ext = 'PNQ' then geraTipoAplic := 'application/x-icq-pnq'
    else if ext = 'PNT' then geraTipoAplic := 'image/x-macpaint'
    else if ext = 'PNTG' then geraTipoAplic := 'image/x-macpaint'
    else if ext = 'POTX' then geraTipoAplic := 'application/vnd.openxmlformats-officedocument.presentationml.template'
    else if ext = 'SLDX' then geraTipoAplic := 'application/vnd.openxmlformats-officedocument.presentationml.slide'
    else if ext = 'XLAM' then geraTipoAplic := 'application/vnd.ms-excel.addin.macroEnabled.12'
    else if ext = 'XLSB' then geraTipoAplic := 'application/vnd.ms-excel.sheet.binary.macroEnabled.12'
    else if ext = 'XLTX' then geraTipoAplic := 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'
    else if ext = 'XSLX' then geraTipoAplic := 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
    else
        geratipoAplic := 'Unknown'
end;

{-------------------------------------------------------------}

begin
end.
