bug #32986 [Mime] fixed wrong mimetype (rjwebdev)
This PR was squashed before being merged into the 4.3 branch (closes #32986).
Discussion
----------
[Mime] fixed wrong mimetype
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #32816
| License | MIT
When creating a datapart from an odt file (and some other extensions), the explode function for the picked mimetype gives a wrong result since there's no `application/` prefix for the first mimetype of this extension.
In this PR, all mimetypes without a prefix are removed.
Commits
-------
e1722c529a
[Mime] fixed wrong mimetype
This commit is contained in:
commit
a3aaaa16e9
@ -2433,12 +2433,12 @@ final class MimeTypes implements MimeTypesInterface
|
|||||||
'odc' => ['application/vnd.oasis.opendocument.chart'],
|
'odc' => ['application/vnd.oasis.opendocument.chart'],
|
||||||
'odf' => ['application/vnd.oasis.opendocument.formula'],
|
'odf' => ['application/vnd.oasis.opendocument.formula'],
|
||||||
'odft' => ['application/vnd.oasis.opendocument.formula-template'],
|
'odft' => ['application/vnd.oasis.opendocument.formula-template'],
|
||||||
'odg' => ['vnd.oasis.opendocument.graphics', 'application/vnd.oasis.opendocument.graphics'],
|
'odg' => ['application/vnd.oasis.opendocument.graphics'],
|
||||||
'odi' => ['application/vnd.oasis.opendocument.image'],
|
'odi' => ['application/vnd.oasis.opendocument.image'],
|
||||||
'odm' => ['application/vnd.oasis.opendocument.text-master'],
|
'odm' => ['application/vnd.oasis.opendocument.text-master'],
|
||||||
'odp' => ['vnd.oasis.opendocument.presentation', 'application/vnd.oasis.opendocument.presentation'],
|
'odp' => ['application/vnd.oasis.opendocument.presentation'],
|
||||||
'ods' => ['vnd.oasis.opendocument.spreadsheet', 'application/vnd.oasis.opendocument.spreadsheet'],
|
'ods' => ['application/vnd.oasis.opendocument.spreadsheet'],
|
||||||
'odt' => ['vnd.oasis.opendocument.text', 'application/vnd.oasis.opendocument.text'],
|
'odt' => ['application/vnd.oasis.opendocument.text'],
|
||||||
'oga' => ['audio/ogg', 'audio/vorbis', 'audio/x-flac+ogg', 'audio/x-ogg', 'audio/x-oggflac', 'audio/x-speex+ogg', 'audio/x-vorbis', 'audio/x-vorbis+ogg'],
|
'oga' => ['audio/ogg', 'audio/vorbis', 'audio/x-flac+ogg', 'audio/x-ogg', 'audio/x-oggflac', 'audio/x-speex+ogg', 'audio/x-vorbis', 'audio/x-vorbis+ogg'],
|
||||||
'ogg' => ['audio/ogg', 'audio/vorbis', 'audio/x-flac+ogg', 'audio/x-ogg', 'audio/x-oggflac', 'audio/x-speex+ogg', 'audio/x-vorbis', 'audio/x-vorbis+ogg', 'video/ogg', 'video/x-ogg', 'video/x-theora', 'video/x-theora+ogg'],
|
'ogg' => ['audio/ogg', 'audio/vorbis', 'audio/x-flac+ogg', 'audio/x-ogg', 'audio/x-oggflac', 'audio/x-speex+ogg', 'audio/x-vorbis', 'audio/x-vorbis+ogg', 'video/ogg', 'video/x-ogg', 'video/x-theora', 'video/x-theora+ogg'],
|
||||||
'ogm' => ['video/x-ogm', 'video/x-ogm+ogg'],
|
'ogm' => ['video/x-ogm', 'video/x-ogm+ogg'],
|
||||||
|
@ -108,10 +108,6 @@ $exts = [
|
|||||||
'mp4' => ['video/mp4'],
|
'mp4' => ['video/mp4'],
|
||||||
'mpeg' => ['video/mpeg'],
|
'mpeg' => ['video/mpeg'],
|
||||||
'mpg' => ['video/mpeg'],
|
'mpg' => ['video/mpeg'],
|
||||||
'odg' => ['vnd.oasis.opendocument.graphics'],
|
|
||||||
'odp' => ['vnd.oasis.opendocument.presentation'],
|
|
||||||
'ods' => ['vnd.oasis.opendocument.spreadsheet'],
|
|
||||||
'odt' => ['vnd.oasis.opendocument.text'],
|
|
||||||
'ogg' => ['audio/ogg'],
|
'ogg' => ['audio/ogg'],
|
||||||
'pdf' => ['application/pdf'],
|
'pdf' => ['application/pdf'],
|
||||||
'php' => ['application/x-php'],
|
'php' => ['application/x-php'],
|
||||||
|
Reference in New Issue
Block a user