Issues (2564)

app/Mime.php (1 issue)

Labels
Severity
1
<?php
2
3
/**
4
 * webtrees: online genealogy
5
 * Copyright (C) 2025 webtrees development team
6
 * This program is free software: you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
 * GNU General Public License for more details.
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
 */
17
18
declare(strict_types=1);
19
20
namespace Fisharebest\Webtrees;
21
22
/**
23
 * A list of known or supported mime types
24
 */
25
class Mime
26
{
27
    public const string DEFAULT_TYPE = 'application/octet-stream';
0 ignored issues
show
A parse error occurred: Syntax error, unexpected T_STRING, expecting '=' on line 27 at column 24
Loading history...
28
29
    // Convert extension to mime-type
30
    public const array TYPES = [
31
        'BMP'  => 'image/bmp',
32
        'CSS'  => 'text/css',
33
        'DOC'  => 'application/msword',
34
        'DOCX' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
35
        'GED'  => 'text/vnd.familysearch.gedcom',
36
        'GIF'  => 'image/gif',
37
        'FLAC' => 'audio/flac',
38
        'HEIF' => 'image/heif',
39
        'HTM'  => 'text/html',
40
        'HTML' => 'text/html',
41
        'ICO'  => 'image/x-icon',
42
        'JPE'  => 'image/jpeg',
43
        'JPEG' => 'image/jpeg',
44
        'JPG'  => 'image/jpeg',
45
        'JS'   => 'application/javascript',
46
        'JSON' => 'application/json',
47
        'MOV'  => 'video/quicktime',
48
        'M4V'  => 'video/mp4',
49
        'MKV'  => 'video/x-matroska',
50
        'MP3'  => 'audio/mpeg',
51
        'MP4'  => 'video/mp4',
52
        'OGA'  => 'audio/ogg',
53
        'OGG'  => 'audio/ogg',
54
        'OGV'  => 'video/ogg',
55
        'PDF'  => 'application/pdf',
56
        'PNG'  => 'image/png',
57
        'RAR'  => 'application/x-rar-compressed',
58
        'SVG'  => 'image/svg+xml',
59
        'TIF'  => 'image/tiff',
60
        'TIFF' => 'image/tiff',
61
        'TXT'  => 'text/plain',
62
        'WEBM' => 'video/webm',
63
        'WEBP' => 'image/webp',
64
        'WMV'  => 'video/x-ms-wmv',
65
        'XLS'  => 'application/vnd-ms-excel',
66
        'XLSX' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
67
        'XML'  => 'application/xml',
68
        'ZIP'  => 'application/zip',
69
    ];
70
}
71