mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 06:27:52 +00:00
Merge pull request #55 from Deutscher-Tischfussballbund/mimetypes
fix: add more mimetypes
This commit is contained in:
@@ -16692,10 +16692,18 @@ function terminDokument() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$extension = strtolower(JFile::getExt($dokumente[0]));
|
$extension = strtolower(JFile::getExt($dokumente[0]));
|
||||||
if ($extension == "pdf")
|
$mimeTypes = [
|
||||||
$mm_type = "application/pdf";
|
'jpg' => 'image/jpeg',
|
||||||
else
|
'jpeg' => 'image/jpeg',
|
||||||
$mm_type = "application/octet-stream";
|
'png' => 'image/png',
|
||||||
|
'webp' => 'image/webp',
|
||||||
|
'pdf' => 'application/pdf',
|
||||||
|
'txt' => 'text/plain'
|
||||||
|
// Add more as needed
|
||||||
|
];
|
||||||
|
|
||||||
|
// Return the corresponding MIME type or a default
|
||||||
|
$mm_type = $mimeTypes[$extension] ?? 'application/octet-stream';
|
||||||
|
|
||||||
ob_end_clean(); // Wegen UTF-8-Zeichen, die in der ausgabe vorhanden sind
|
ob_end_clean(); // Wegen UTF-8-Zeichen, die in der ausgabe vorhanden sind
|
||||||
header("Pragma: public");
|
header("Pragma: public");
|
||||||
|
|||||||
Reference in New Issue
Block a user