1e7f16b43SGreg Roach<?php 2e7f16b43SGreg Roach 3e7f16b43SGreg Roach/** 4e7f16b43SGreg Roach * webtrees: online genealogy 589f7189bSGreg Roach * Copyright (C) 2021 webtrees development team 6e7f16b43SGreg Roach * This program is free software: you can redistribute it and/or modify 7e7f16b43SGreg Roach * it under the terms of the GNU General Public License as published by 8e7f16b43SGreg Roach * the Free Software Foundation, either version 3 of the License, or 9e7f16b43SGreg Roach * (at your option) any later version. 10e7f16b43SGreg Roach * This program is distributed in the hope that it will be useful, 11e7f16b43SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 12e7f16b43SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13e7f16b43SGreg Roach * GNU General Public License for more details. 14e7f16b43SGreg Roach * You should have received a copy of the GNU General Public License 1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 16e7f16b43SGreg Roach */ 17e7f16b43SGreg Roach 18e7f16b43SGreg Roachdeclare(strict_types=1); 19e7f16b43SGreg Roach 20e7f16b43SGreg Roachnamespace Fisharebest\Webtrees; 21e7f16b43SGreg Roach 22e7f16b43SGreg Roach/** 23e7f16b43SGreg Roach * A list of known or supported mime types 24e7f16b43SGreg Roach */ 25e7f16b43SGreg Roachclass Mime 26e7f16b43SGreg Roach{ 27e7f16b43SGreg Roach public const DEFAULT_TYPE = 'application/octet-stream'; 28e7f16b43SGreg Roach 29e7f16b43SGreg Roach // Convert extension to mime-type 30e7f16b43SGreg Roach public const TYPES = [ 31e7f16b43SGreg Roach 'bmp' => 'image/bmp', 32e7f16b43SGreg Roach 'css' => 'text/css', 33e7f16b43SGreg Roach 'doc' => 'application/msword', 34e7f16b43SGreg Roach 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 35*2baa64f3SGreg Roach 'ged' => 'text/vnd.familysearch.gedcom', 36e7f16b43SGreg Roach 'gif' => 'image/gif', 3765472137SGreg Roach 'flac' => 'audio/flac', 38e7f16b43SGreg Roach 'htm' => 'text/html', 39e7f16b43SGreg Roach 'html' => 'text/html', 40e7f16b43SGreg Roach 'ico' => 'image/x-icon', 41e7f16b43SGreg Roach 'jpe' => 'image/jpeg', 42e7f16b43SGreg Roach 'jpeg' => 'image/jpeg', 43e7f16b43SGreg Roach 'jpg' => 'image/jpeg', 44e7f16b43SGreg Roach 'js' => 'application/javascript', 45e7f16b43SGreg Roach 'json' => 'application/json', 46e7f16b43SGreg Roach 'mov' => 'video/quicktime', 47e7f16b43SGreg Roach 'mp3' => 'audio/mpeg', 48e7f16b43SGreg Roach 'mp4' => 'video/mp4', 4965472137SGreg Roach 'oga' => 'audio/ogg', 5065472137SGreg Roach 'ogg' => 'audio/ogg', 51e7f16b43SGreg Roach 'ogv' => 'video/ogg', 52e7f16b43SGreg Roach 'pdf' => 'application/pdf', 53e7f16b43SGreg Roach 'png' => 'image/png', 54e7f16b43SGreg Roach 'rar' => 'application/x-rar-compressed', 5591694fa0SRico Sonntag 'svg' => 'image/svg+xml', 56e7f16b43SGreg Roach 'tif' => 'image/tiff', 57e7f16b43SGreg Roach 'tiff' => 'image/tiff', 58e7f16b43SGreg Roach 'txt' => 'text/plain', 59c68bc8e2SGreg Roach 'webp' => 'image/webp', 60e7f16b43SGreg Roach 'wmv' => 'video/x-ms-wmv', 61e7f16b43SGreg Roach 'xls' => 'application/vnd-ms-excel', 62e7f16b43SGreg Roach 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 63e7f16b43SGreg Roach 'xml' => 'application/xml', 64e7f16b43SGreg Roach 'zip' => 'application/zip', 65e7f16b43SGreg Roach ]; 66e7f16b43SGreg Roach} 67