90 {
91
92 $types_map = array (
93 '.3gp' => 'video/3gpp',
94 '.a' => 'application/octet-stream',
95 '.ai' => 'application/postscript',
96 '.aif' => 'audio/x-aiff',
97 '.aifc' => 'audio/x-aiff',
98 '.aiff' => 'audio/x-aiff',
99 '.asd' => 'application/astound',
100 '.asf' => 'video/x-ms-asf',
101 '.asn' => 'application/astound',
102 '.asx' => 'video/x-ms-asf',
103 '.au' => 'audio/basic',
104 '.avi' => 'video/x-msvideo',
105 '.bat' => 'text/plain',
106 '.bcpio' => 'application/x-bcpio',
107 '.bin' => 'application/octet-stream',
108 '.bmp' => 'image/x-ms-bmp',
109 '.c' => 'text/plain',
110 '.cdf' => 'application/x-cdf',
111 '.class' => 'application/x-java-applet',
112 '.com' => 'application/octet-stream',
113 '.cpio' => 'application/x-cpio',
114 '.csh' => 'application/x-csh',
115 '.css' => 'text/css',
116 '.csv' => 'text/comma-separated-values',
117 '.dcr' => 'application/x-director',
118 '.dir' => 'application/x-director',
119 '.dll' => 'application/octet-stream',
120 '.doc' => 'application/msword',
121 '.docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
122 '.dot' => 'application/msword',
123 '.dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
124 '.dvi' => 'application/x-dvi',
125 '.dwg' => 'application/acad',
126 '.dxf' => 'application/dxf',
127 '.dxr' => 'application/x-director',
128 '.eml' => 'message/rfc822',
129 '.eps' => 'application/postscript',
130 '.etx' => 'text/x-setext',
131 '.exe' => 'application/octet-stream',
132 '.flv' => 'video/x-flv',
133 '.gif' => 'image/gif',
134 '.gtar' => 'application/x-gtar',
135 '.gz' => 'application/gzip',
136 '.h' => 'text/plain',
137 '.hdf' => 'application/x-hdf',
138 '.htm' => 'text/html',
139 '.html' => 'text/html',
140 '.ief' => 'image/ief',
141 '.iff' => 'image/iff',
142 '.jar' => 'application/x-java-applet',
143 '.jpe' => 'image/jpeg',
144 '.jpeg' => 'image/jpeg',
145 '.jpg' => 'image/jpeg',
146 '.js' => 'text/javascript',
147 '.ksh' => 'text/plain',
148 '.latex' => 'application/x-latex',
149 '.m1v' => 'video/mpeg',
150 '.man' => 'application/x-troff-man',
151 '.me' => 'application/x-troff-me',
152 '.mht' => 'message/rfc822',
153 '.mhtml' => 'message/rfc822',
154 '.mid' => 'audio/x-midi',
155 '.midi' => 'audio/x-midi',
156 '.mif' => 'application/x-mif',
157 '.mov' => 'video/quicktime',
158 '.movie' => 'video/x-sgi-movie',
159 '.mp2' => 'audio/mpeg',
160 '.mp3' => 'audio/mpeg',
161 '.mpa' => 'video/mpeg',
162 '.mpe' => 'video/mpeg',
163 '.mpeg' => 'video/mpeg',
164 '.mpg' => 'video/mpeg',
165 '.mp4' => 'video/mp4',
166 '.mv4' => 'video/mp4',
167 '.ms' => 'application/x-troff-ms',
168 '.nc' => 'application/x-netcdf',
169 '.nws' => 'message/rfc822',
170 '.o' => 'application/octet-stream',
171 '.ogg' => 'application/ogg',
172 '.oga' => 'audio/ogg',
173 '.ogv' => 'video/ogg',
174 '.obj' => 'application/octet-stream',
175 '.oda' => 'application/oda',
176 '.p12' => 'application/x-pkcs12',
177 '.p7c' => 'application/pkcs7-mime',
178 '.pbm' => 'image/x-portable-bitmap',
179 '.pdf' => 'application/pdf',
180 '.pfx' => 'application/x-pkcs12',
181 '.pgm' => 'image/x-portable-graymap',
182 '.php' => 'application/x-httpd-php',
183 '.phtml' => 'application/x-httpd-php',
184 '.pl' => 'text/plain',
185 '.png' => 'image/png',
186 '.pnm' => 'image/x-portable-anymap',
187 '.pot' => 'application/vnd.ms-powerpoint',
188 '.potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
189 '.ppa' => 'application/vnd.ms-powerpoint',
190 '.ppm' => 'image/x-portable-pixmap',
191 '.pps' => 'application/vnd.ms-powerpoint',
192 '.ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
193 '.ppt' => 'application/vnd.ms-powerpoint',
194 '.pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
195 '.ps' => 'application/postscript',
196 '.psd' => 'image/psd',
197 '.pwz' => 'application/vnd.ms-powerpoint',
198 '.py' => 'text/x-python',
199 '.pyc' => 'application/x-python-code',
200 '.pyo' => 'application/x-python-code',
201 '.qt' => 'video/quicktime',
202 '.ra' => 'audio/x-pn-realaudio',
203 '.ram' => 'application/x-pn-realaudio',
204 '.ras' => 'image/x-cmu-raster',
205 '.rdf' => 'application/xml',
206 '.rgb' => 'image/x-rgb',
207 '.roff' => 'application/x-troff',
208 '.rpm' => 'audio/x-pn-realaudio-plugin',
209 '.rtf' => 'application/rtf',
210 '.rtx' => 'text/richtext',
211 '.sgm' => 'text/x-sgml',
212 '.sgml' => 'text/x-sgml',
213 '.sh' => 'application/x-sh',
214 '.shar' => 'application/x-shar',
215 '.sit' => 'application/x-stuffit',
216 '.sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
217 '.snd' => 'audio/basic',
218 '.so' => 'application/octet-stream',
219 '.spc' => 'text/x-speech',
220 '.src' => 'application/x-wais-source',
221 '.sv4cpio'=> 'application/x-sv4cpio',
222 '.sv4crc' => 'application/x-sv4crc',
223 '.svg' => 'image/svg+xml',
224 '.swf' => 'application/x-shockwave-flash',
225 '.t' => 'application/x-troff',
226 '.tar' => 'application/x-tar',
227 '.talk' => 'text/x-speech',
228 '.tbk' => 'application/toolbook',
229 '.tcl' => 'application/x-tcl',
230 '.tex' => 'application/x-tex',
231 '.texi' => 'application/x-texinfo',
232 '.texinfo'=> 'application/x-texinfo',
233 '.tif' => 'image/tiff',
234 '.tiff' => 'image/tiff',
235 '.tr' => 'application/x-troff',
236 '.tsv' => 'text/tab-separated-values',
237 '.tsp' => 'application/dsptype',
238 '.txt' => 'text/plain',
239 '.ustar' => 'application',
240 '.vcf' => 'text/x-vcard',
241 '.vimeo' => 'video/vimeo',
242 '.vox' => 'audio/voxware',
243 '.wav' => 'audio/x-wav',
244 '.wax' => 'audio/x-ms-wax',
245 '.wiz' => 'application/msword',
246 '.webm' => 'video/webm',
247 '.wm' => 'video/x-ms-wm',
248 '.wma' => 'audio/x-ms-wma',
249 '.wmd' => 'video/x-ms-wmd',
250 '.wml' => 'text/vnd.wap.wml',
251 '.wmlc' => 'application/vnd.wap.wmlc',
252 '.wmls' => 'text/vnd.wap.wmlscript',
253 '.wmlsc' => 'application/vnd.wap.wmlscriptc',
254 '.wmv' => 'video/x-ms-wmv',
255 '.wmx' => 'video/x-ms-wmx',
256 '.wmz' => 'video/x-ms-wmz',
257 '.wvx' => 'video/x-ms-wvx',
258 '.wrl' => 'x-world/x-vrml',
259 '.xbm' => 'image/x-xbitmap',
260 '.xla' => 'application/msexcel',
261 '.xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
262 '.xlb' => 'application/vnd.ms-excel',
263 '.xls' => 'application/msexcel',
264 '.xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
265 '.xml' => 'text/xml',
266 '.xpm' => 'image/x-xpixmap',
267 '.xsl' => 'application/xml',
268 '.xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
269 '.xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
270 '.xwd' => 'image/x-xwindowdump',
271 '.youtube' => 'video/youtube',
272 '.zip' => 'application/zip');
273
274 return $types_map;
275 }