Ignore:
Timestamp:
Dec 3, 2005 9:17:54 PM (18 years ago)
Author:
scdev
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Upload.inc.php

    r24 r25  
    3939    // Array of file name extensions and corresponding mime-types.
    4040    var $mime_extension_map = array(
    41         'Z'       => 'application/x-compress',
    42         'ai'      => 'application/postscript',
    43         'aif'     => 'audio/x-aiff',
    44         'aifc'    => 'audio/x-aiff',
    45         'aiff'    => 'audio/x-aiff',
    46         'asc'     => 'text/plain',
    47         'asf'     => 'video/x-ms-asf',
    48         'asx'     => 'video/x-ms-asf',
    49         'au'      => 'audio/basic',
    50         'avi'     => 'video/x-msvideo',
    51         'bcpio'   => 'application/x-bcpio',
     41        'ez'      => 'application/andrew-inset',
     42        'hqx'     => 'application/mac-binhex40',
     43        'cpt'     => 'application/mac-compactpro',
     44        'doc'     => 'application/msword',
    5245        'bin'     => 'application/octet-stream',
    53         'bmp'     => 'image/bmp',
    54         'cdf'     => 'application/x-netcdf',
    5546        'class'   => 'application/octet-stream',
    56         'cpio'    => 'application/x-cpio',
    57         'cpt'     => 'application/mac-compactpro',
    58         'csh'     => 'application/x-csh',
    59         'css'     => 'text/css',
    60         'dcr'     => 'application/x-director',
    61         'diff'    => 'text/diff',
    62         'dir'     => 'application/x-director',
    6347        'dll'     => 'application/octet-stream',
    6448        'dms'     => 'application/octet-stream',
    65         'doc'     => 'application/msword',
     49        'exe'     => 'application/octet-stream',
     50        'lha'     => 'application/octet-stream',
     51        'lzh'     => 'application/octet-stream',
     52        'so'      => 'application/octet-stream',
     53        'oda'     => 'application/oda',
     54        'pdf'     => 'application/pdf',
     55        'ps'      => 'application/postscript',
     56        'eps'     => 'application/postscript',
     57        'ai'      => 'application/postscript',
     58        'smi'     => 'application/smil',
     59        'smil'    => 'application/smil',
     60        'mif'     => 'application/vnd.mif',
     61        'xls'     => 'application/vnd.ms-excel',
     62        'ppt'     => 'application/vnd.ms-powerpoint',
     63        'stc'     => 'application/vnd.sun.xml.calc.template',
     64        'sxc'     => 'application/vnd.sun.xml.calc',
     65        'std'     => 'application/vnd.sun.xml.draw.template',
     66        'sxd'     => 'application/vnd.sun.xml.draw',
     67        'sti'     => 'application/vnd.sun.xml.impress.template',
     68        'sxi'     => 'application/vnd.sun.xml.impress',
     69        'sxm'     => 'application/vnd.sun.xml.math',
     70        'sxg'     => 'application/vnd.sun.xml.writer.global',
     71        'stw'     => 'application/vnd.sun.xml.writer.template',
     72        'sxw'     => 'application/vnd.sun.xml.writer',
     73        'vsd'     => 'application/vnd.visio',
     74        'wbxml'   => 'application/vnd.wap.wbxml',
     75        'wmlc'    => 'application/vnd.wap.wmlc',
     76        'wmlsc'   => 'application/vnd.wap.wmlscriptc',
     77        'bcpio'   => 'application/x-bcpio',
     78        'vcd'     => 'application/x-cdlink',
     79        'pgn'     => 'application/x-chess-pgn',
     80        'Z'       => 'application/x-compress',
     81        'cpio'    => 'application/x-cpio',
     82        'csh'     => 'application/x-csh',
     83        'dcr'     => 'application/x-director',
     84        'dir'     => 'application/x-director',
     85        'dxr'     => 'application/x-director',
    6686        'dvi'     => 'application/x-dvi',
    67         'dxr'     => 'application/x-director',
    68         'eps'     => 'application/postscript',
    69         'etx'     => 'text/x-setext',
    70         'exe'     => 'application/octet-stream',
    71         'ez'      => 'application/andrew-inset',
    72         'gif'     => 'image/gif',
     87        'spl'     => 'application/x-futuresplash',
    7388        'gtar'    => 'application/x-gtar',
     89        'tgz'     => 'application/x-gtar',
    7490        'gz'      => 'application/x-gzip',
    7591        'hdf'     => 'application/x-hdf',
    76         'hqx'     => 'application/mac-binhex40',
    77         'htm'     => 'text/html',
    78         'html'    => 'text/html',
    79         'ice'     => 'x-conference/x-cooltalk',
    80         'ics'     => 'text/calendar',
    81         'ief'     => 'image/ief',
    82         'ifb'     => 'text/calendar',
    83         'iges'    => 'model/iges',
    84         'igs'     => 'model/iges',
    85         'jpe'     => 'image/jpeg',
    86         'jpeg'    => 'image/jpeg',
    87         'jpg'     => 'image/jpeg',
     92        'php3'    => 'application/x-httpd-php3',
     93        'php'     => 'application/x-httpd-php',
    8894        'js'      => 'application/x-javascript',
    89         'kar'     => 'audio/midi',
    90         'latex'   => 'application/x-latex',
    91         'lha'     => 'application/octet-stream',
    92         'log'     => 'text/plain',
    93         'lzh'     => 'application/octet-stream',
    94         'm3u'     => 'audio/x-mpegurl',
    95         'man'     => 'application/x-troff-man',
    96         'me'      => 'application/x-troff-me',
    97         'mesh'    => 'model/mesh',
    98         'mid'     => 'audio/midi',
    99         'midi'    => 'audio/midi',
    100         'mif'     => 'application/vnd.mif',
    101         'mov'     => 'video/quicktime',
    102         'movie'   => 'video/x-sgi-movie',
    103         'mp2'     => 'audio/mpeg',
    104         'mp3'     => 'audio/mpeg',
    105         'mpe'     => 'video/mpeg',
    106         'mpeg'    => 'video/mpeg',
    107         'mpg'     => 'video/mpeg',
    108         'mpga'    => 'audio/mpeg',
    109         'ms'      => 'application/x-troff-ms',
    110         'msh'     => 'model/mesh',
    111         'mxu'     => 'video/vnd.mpegurl',
    112         'nc'      => 'application/x-netcdf',
    113         'oda'     => 'application/oda',
    114         'patch'   => 'text/diff',
    115         'pbm'     => 'image/x-portable-bitmap',
    116         'pdb'     => 'chemical/x-pdb',
    117         'pdf'     => 'application/pdf',
    118         'pgm'     => 'image/x-portable-graymap',
    119         'pgn'     => 'application/x-chess-pgn',
    120         'php'     => 'application/x-httpd-php',
    121         'php3'    => 'application/x-httpd-php3',
    122         'pl'      => 'application/x-perl',
    123         'pm'      => 'application/x-perl',
    124         'png'     => 'image/png',
    125         'pnm'     => 'image/x-portable-anymap',
    126         'po'      => 'text/plain',
    127         'ppm'     => 'image/x-portable-pixmap',
    128         'ppt'     => 'application/vnd.ms-powerpoint',
    129         'ps'      => 'application/postscript',
    130         'qt'      => 'video/quicktime',
    131         'ra'      => 'audio/x-realaudio',
    132         'ram'     => 'audio/x-pn-realaudio',
    133         'ras'     => 'image/x-cmu-raster',
    134         'rgb'     => 'image/x-rgb',
    135         'rm'      => 'audio/x-pn-realaudio',
    136         'roff'    => 'application/x-troff',
    137         'rpm'     => 'audio/x-pn-realaudio-plugin',
    138         'rtf'     => 'text/rtf',
    139         'rtx'     => 'text/richtext',
    140         'sgm'     => 'text/sgml',
    141         'sgml'    => 'text/sgml',
    142         'sh'      => 'application/x-sh',
    143         'shar'    => 'application/x-shar',
    144         'shtml'   => 'text/html',
    145         'silo'    => 'model/mesh',
    146         'sit'     => 'application/x-stuffit',
    14795        'skd'     => 'application/x-koan',
    14896        'skm'     => 'application/x-koan',
    14997        'skp'     => 'application/x-koan',
    15098        'skt'     => 'application/x-koan',
    151         'smi'     => 'application/smil',
    152         'smil'    => 'application/smil',
    153         'snd'     => 'audio/basic',
    154         'so'      => 'application/octet-stream',
    155         'spl'     => 'application/x-futuresplash',
    156         'src'     => 'application/x-wais-source',
    157         'stc'     => 'application/vnd.sun.xml.calc.template',
    158         'std'     => 'application/vnd.sun.xml.draw.template',
    159         'sti'     => 'application/vnd.sun.xml.impress.template',
    160         'stw'     => 'application/vnd.sun.xml.writer.template',
     99        'latex'   => 'application/x-latex',
     100        'wmd'     => 'application/x-ms-wmd',
     101        'wmz'     => 'application/x-ms-wmz',
     102        'cdf'     => 'application/x-netcdf',
     103        'nc'      => 'application/x-netcdf',
     104        'pl'      => 'application/x-perl',
     105        'pm'      => 'application/x-perl',
     106        'shar'    => 'application/x-shar',
     107        'swf'     => 'application/x-shockwave-flash',
     108        'sh'      => 'application/x-sh',
     109        'sit'     => 'application/x-stuffit',
    161110        'sv4cpio' => 'application/x-sv4cpio',
    162111        'sv4crc'  => 'application/x-sv4crc',
    163         'swf'     => 'application/x-shockwave-flash',
    164         'sxc'     => 'application/vnd.sun.xml.calc',
    165         'sxd'     => 'application/vnd.sun.xml.draw',
    166         'sxg'     => 'application/vnd.sun.xml.writer.global',
    167         'sxi'     => 'application/vnd.sun.xml.impress',
    168         'sxm'     => 'application/vnd.sun.xml.math',
    169         'sxw'     => 'application/vnd.sun.xml.writer',
    170         't'       => 'application/x-troff',
    171112        'tar'     => 'application/x-tar',
    172113        'tcl'     => 'application/x-tcl',
    173         'tex'     => 'application/x-tex',
    174114        'texi'    => 'application/x-texinfo',
    175115        'texinfo' => 'application/x-texinfo',
    176         'tgz'     => 'application/x-gtar',
     116        'tex'     => 'application/x-tex',
     117        'man'     => 'application/x-troff-man',
     118        'me'      => 'application/x-troff-me',
     119        'ms'      => 'application/x-troff-ms',
     120        'roff'    => 'application/x-troff',
     121        't'       => 'application/x-troff',
     122        'tr'      => 'application/x-troff',
     123        'ustar'   => 'application/x-ustar',
     124        'src'     => 'application/x-wais-source',
     125        'xhtml'   => 'application/xhtml+xml',
     126        'xht'     => 'application/xhtml+xml',
     127        'xml'     => 'application/xml',
     128        'zip'     => 'application/zip',
     129        'au'      => 'audio/basic',
     130        'snd'     => 'audio/basic',
     131        'kar'     => 'audio/midi',
     132        'mid'     => 'audio/midi',
     133        'midi'    => 'audio/midi',
     134        'mp3'     => 'audio/mpeg',
     135        'mp2'     => 'audio/mpeg',
     136        'mpga'    => 'audio/mpeg',
     137        'aiff'    => 'audio/x-aiff',
     138        'aif'     => 'audio/x-aiff',
     139        'aifc'    => 'audio/x-aiff',
     140        'm3u'     => 'audio/x-mpegurl',
     141        'wax'     => 'audio/x-ms-wax',
     142        'wma'     => 'audio/x-ms-wma',
     143        'rpm'     => 'audio/x-pn-realaudio-plugin',
     144        'ram'     => 'audio/x-pn-realaudio',
     145        'rm'      => 'audio/x-pn-realaudio',
     146        'ra'      => 'audio/x-realaudio',
     147        'wav'     => 'audio/x-wav',
     148        'pdb'     => 'chemical/x-pdb',
     149        'xyz'     => 'chemical/x-xyz',
     150        'bmp'     => 'image/bmp',
     151        'gif'     => 'image/gif',
     152        'ief'     => 'image/ief',
     153        'jpg'     => 'image/jpeg',
     154        'jpe'     => 'image/jpeg',
     155        'jpeg'    => 'image/jpeg',
     156        'png'     => 'image/png',
    177157        'tif'     => 'image/tiff',
    178158        'tiff'    => 'image/tiff',
    179         'tr'      => 'application/x-troff',
    180         'tsv'     => 'text/tab-separated-values',
    181         'txt'     => 'text/plain',
    182         'ustar'   => 'application/x-ustar',
    183         'vcd'     => 'application/x-cdlink',
    184         'vcf'     => 'text/x-vcard',
     159        'wbmp'    => 'image/vnd.wap.wbmp',
     160        'ras'     => 'image/x-cmu-raster',
     161        'pnm'     => 'image/x-portable-anymap',
     162        'pbm'     => 'image/x-portable-bitmap',
     163        'pgm'     => 'image/x-portable-graymap',
     164        'ppm'     => 'image/x-portable-pixmap',
     165        'rgb'     => 'image/x-rgb',
     166        'xbm'     => 'image/x-xbitmap',
     167        'xpm'     => 'image/x-xpixmap',
     168        'xwd'     => 'image/x-xwindowdump',
     169        'iges'    => 'model/iges',
     170        'igs'     => 'model/iges',
     171        'mesh'    => 'model/mesh',
     172        'msh'     => 'model/mesh',
     173        'silo'    => 'model/mesh',
     174        'vrml'    => 'model/vrml',
     175        'wrl'     => 'model/vrml',
     176        'ics'     => 'text/calendar',
     177        'ifb'     => 'text/calendar',
    185178        'vcs'     => 'text/calendar',
    186179        'vfb'     => 'text/calendar',
    187         'vrml'    => 'model/vrml',
    188         'vsd'     => 'application/vnd.visio',
    189         'wav'     => 'audio/x-wav',
    190         'wax'     => 'audio/x-ms-wax',
    191         'wbmp'    => 'image/vnd.wap.wbmp',
    192         'wbxml'   => 'application/vnd.wap.wbxml',
     180        'css'     => 'text/css',
     181        'diff'    => 'text/diff',
     182        'patch'   => 'text/diff',
     183        'html'    => 'text/html',
     184        'htm'     => 'text/html',
     185        'shtml'   => 'text/html',
     186        'txt'     => 'text/plain',
     187        'asc'     => 'text/plain',
     188        'log'     => 'text/plain',
     189        'po'      => 'text/plain',
     190        'rtx'     => 'text/richtext',
     191        'rtf'     => 'text/rtf',
     192        'sgm'     => 'text/sgml',
     193        'sgml'    => 'text/sgml',
     194        'tsv'     => 'text/tab-separated-values',
     195        'wmls'    => 'text/vnd.wap.wmlscript',
     196        'wml'     => 'text/vnd.wap.wml',
     197        'etx'     => 'text/x-setext',
     198        'vcf'     => 'text/x-vcard',
     199        'xsl'     => 'text/xml',
     200        'mpeg'    => 'video/mpeg',
     201        'mpe'     => 'video/mpeg',
     202        'mpg'     => 'video/mpeg',
     203        'mov'     => 'video/quicktime',
     204        'qt'      => 'video/quicktime',
     205        'mxu'     => 'video/vnd.mpegurl',
     206        'asf'     => 'video/x-ms-asf',
     207        'asx'     => 'video/x-ms-asf',
     208        'wmv'     => 'video/x-ms-wmv',
    193209        'wm'      => 'video/x-ms-wm',
    194         'wma'     => 'audio/x-ms-wma',
    195         'wmd'     => 'application/x-ms-wmd',
    196         'wml'     => 'text/vnd.wap.wml',
    197         'wmlc'    => 'application/vnd.wap.wmlc',
    198         'wmls'    => 'text/vnd.wap.wmlscript',
    199         'wmlsc'   => 'application/vnd.wap.wmlscriptc',
    200         'wmv'     => 'video/x-ms-wmv',
    201210        'wmx'     => 'video/x-ms-wmx',
    202         'wmz'     => 'application/x-ms-wmz',
    203         'wrl'     => 'model/vrml',
    204211        'wvx'     => 'video/x-ms-wvx',
    205         'xbm'     => 'image/x-xbitmap',
    206         'xht'     => 'application/xhtml+xml',
    207         'xhtml'   => 'application/xhtml+xml',
    208         'xls'     => 'application/vnd.ms-excel',
    209         'xml'     => 'application/xml',
    210         'xpm'     => 'image/x-xpixmap',
    211         'xsl'     => 'text/xml',
    212         'xwd'     => 'image/x-xwindowdump',
    213         'xyz'     => 'chemical/x-xyz',
    214         'zip'     => 'application/zip'
     212        'avi'     => 'video/x-msvideo',
     213        'movie'   => 'video/x-sgi-movie',
     214        'ice'     => 'x-conference/x-cooltalk',
    215215    );
    216216   
Note: See TracChangeset for help on using the changeset viewer.