MediaWiki REL1_35
MimeMapMinimal.php
Go to the documentation of this file.
1<?php
21namespace Wikimedia\Mime;
22
33 public const MIME_EXTENSIONS = [
34 'application/ogg' => [ 'ogx', 'ogg', 'ogm', 'ogv', 'oga', 'spx', 'opus' ],
35 'application/pdf' => [ 'pdf' ],
36 'application/vnd.oasis.opendocument.chart' => [ 'odc' ],
37 'application/vnd.oasis.opendocument.chart-template' => [ 'otc' ],
38 'application/vnd.oasis.opendocument.database' => [ 'odb' ],
39 'application/vnd.oasis.opendocument.formula' => [ 'odf' ],
40 'application/vnd.oasis.opendocument.formula-template' => [ 'otf' ],
41 'application/vnd.oasis.opendocument.graphics' => [ 'odg' ],
42 'application/vnd.oasis.opendocument.graphics-template' => [ 'otg' ],
43 'application/vnd.oasis.opendocument.image' => [ 'odi' ],
44 'application/vnd.oasis.opendocument.image-template' => [ 'oti' ],
45 'application/vnd.oasis.opendocument.presentation' => [ 'odp' ],
46 'application/vnd.oasis.opendocument.presentation-template' => [ 'otp' ],
47 'application/vnd.oasis.opendocument.spreadsheet' => [ 'ods' ],
48 'application/vnd.oasis.opendocument.spreadsheet-template' => [ 'ots' ],
49 'application/vnd.oasis.opendocument.text' => [ 'odt' ],
50 'application/vnd.oasis.opendocument.text-master' => [ 'otm' ],
51 'application/vnd.oasis.opendocument.text-template' => [ 'ott' ],
52 'application/vnd.oasis.opendocument.text-web' => [ 'oth' ],
53 'application/javascript' => [ 'js' ],
54 'application/x-shockwave-flash' => [ 'swf' ],
55 'audio/midi' => [ 'mid', 'midi', 'kar' ],
56 'audio/mpeg' => [ 'mpga', 'mpa', 'mp2', 'mp3' ],
57 'audio/x-aiff' => [ 'aif', 'aiff', 'aifc' ],
58 'audio/x-wav' => [ 'wav' ],
59 'audio/ogg' => [ 'oga', 'spx', 'ogg', 'opus' ],
60 'audio/opus' => [ 'opus', 'ogg', 'oga', 'spx' ],
61 'image/x-bmp' => [ 'bmp' ],
62 'image/gif' => [ 'gif' ],
63 'image/jpeg' => [ 'jpeg', 'jpg', 'jpe' ],
64 'image/png' => [ 'png' ],
65 'image/svg+xml' => [ 'svg' ],
66 'image/svg' => [ 'svg' ],
67 'image/tiff' => [ 'tiff', 'tif' ],
68 'image/vnd.djvu' => [ 'djvu' ],
69 'image/x.djvu' => [ 'djvu' ],
70 'image/x-djvu' => [ 'djvu' ],
71 'image/x-portable-pixmap' => [ 'ppm' ],
72 'image/x-xcf' => [ 'xcf' ],
73 'text/plain' => [ 'txt' ],
74 'text/html' => [ 'html', 'htm' ],
75 'video/ogg' => [ 'ogv', 'ogm', 'ogg' ],
76 'video/mpeg' => [ 'mpg', 'mpeg' ],
77 ];
78
79 public const MEDIA_TYPES = [
81 'application/pdf',
82 'application/vnd.oasis.opendocument.chart',
83 'application/vnd.oasis.opendocument.chart-template',
84 'application/vnd.oasis.opendocument.database',
85 'application/vnd.oasis.opendocument.formula',
86 'application/vnd.oasis.opendocument.formula-template',
87 'application/vnd.oasis.opendocument.graphics',
88 'application/vnd.oasis.opendocument.graphics-template',
89 'application/vnd.oasis.opendocument.image',
90 'application/vnd.oasis.opendocument.image-template',
91 'application/vnd.oasis.opendocument.presentation',
92 'application/vnd.oasis.opendocument.presentation-template',
93 'application/vnd.oasis.opendocument.spreadsheet',
94 'application/vnd.oasis.opendocument.spreadsheet-template',
95 'application/vnd.oasis.opendocument.text',
96 'application/vnd.oasis.opendocument.text-template',
97 'application/vnd.oasis.opendocument.text-master',
98 'application/vnd.oasis.opendocument.text-web',
99 ],
101 'application/javascript',
102 'text/javascript',
103 'application/x-javascript',
104 ],
106 'application/x-shockwave-flash',
107 'application/ogg',
108 'audio/ogg',
109 'video/ogg',
110 ],
111 MEDIATYPE_AUDIO => [
112 'audio/midi',
113 'audio/x-aiff',
114 'audio/x-wav',
115 'audio/mp3',
116 'audio/mpeg',
117 ],
119 'image/x-bmp',
120 'image/x-ms-bmp',
121 'image/bmp',
122 'image/gif',
123 'image/jpeg',
124 'image/png',
125 'image/tiff',
126 'image/vnd.djvu',
127 'image/x-xcf',
128 'image/x-portable-pixmap',
129 ],
131 'image/svg+xml',
132 ],
133 MEDIATYPE_TEXT => [
134 'text/plain',
135 'text/html',
136 ],
137 MEDIATYPE_VIDEO => [
138 'video/ogg',
139 'video/mpeg',
140 ],
142 'unknown/unknown',
143 'application/octet-stream',
144 'application/x-empty',
145 ],
146 ];
147
148 public const MIME_TYPE_ALIASES = [
149 'text/javascript' => 'application/javascript',
150 'application/x-javascript' => 'application/javascript',
151 'audio/mpeg' => 'audio/mp3',
152 'audio/ogg' => 'application/ogg',
153 'video/ogg' => 'application/ogg',
154 'image/x-ms-bmp' => 'image/x-bmp',
155 'image/bmp' => 'image/x-bmp',
156 'application/octet-stream' => 'unknown/unknown',
157 'application/x-empty' => 'unknown/unknown',
158 ];
159}
MimeMapMinimal defines a core set of MIME types that cannot be overridden by configuration.
const MEDIATYPE_DRAWING
Definition defines.php:30
const MEDIATYPE_VIDEO
Definition defines.php:35
const MEDIATYPE_OFFICE
Definition defines.php:39
const MEDIATYPE_UNKNOWN
Definition defines.php:26
const MEDIATYPE_AUDIO
Definition defines.php:32
const MEDIATYPE_TEXT
Definition defines.php:41
const MEDIATYPE_BITMAP
Definition defines.php:28
const MEDIATYPE_MULTIMEDIA
Definition defines.php:37
const MEDIATYPE_EXECUTABLE
Definition defines.php:43