mirror of
https://github.com/Deutscher-Tischfussballbund/com_sportsmanager.git
synced 2026-06-10 14:37:52 +00:00
fix: add more mimetypes
This commit is contained in:
@@ -17622,10 +17622,18 @@ function terminDokument() {
|
||||
}
|
||||
|
||||
$extension = strtolower(JFile::getExt($dokumente[0]));
|
||||
if ($extension == "pdf")
|
||||
$mm_type = "application/pdf";
|
||||
else
|
||||
$mm_type = "application/octet-stream";
|
||||
$mimeTypes = [
|
||||
'jpg' => 'image/jpeg',
|
||||
'jpeg' => 'image/jpeg',
|
||||
'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
|
||||
header("Pragma: public");
|
||||
|
||||
Reference in New Issue
Block a user