add (not exactly correct -> see fixme) mime types for docx and xlsx

This commit is contained in:
Mario Vavti
2026-01-05 12:14:01 +01:00
parent f25211d7ff
commit 7675ed0145
4 changed files with 14 additions and 2 deletions

View File

@@ -101,8 +101,14 @@ function z_mime_content_type($filename) {
// ms office
'doc' => 'application/msword',
// FIXME: this is the correct mime type for docx but it is too long to store in DB (postrges) as of 2026-01-05
// 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'docx' => 'application/vnd.ms-word',
'rtf' => 'application/rtf',
'xls' => 'application/vnd.ms-excel',
// FIXME: this is the correct mime type for xlsx but it is too long to store in DB (postrges) as of 2026-01-05
//'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'xlsx' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
// open office

View File

@@ -3210,10 +3210,12 @@ function getIconFromType($type) {
'application/msword' => 'bi-file-earmark-word',
'application/pdf' => 'bi-file-earmark-pdf',
'application/vnd.oasis.opendocument.text' => 'bi-file-earmark-text',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => 'bi-file-earmark-text',
'application/epub+zip' => 'bi-file-earmark-text',
//Spreadsheet
'application/vnd.oasis.opendocument.spreadsheet' => 'bi-file-earmark-spreadsheet',
'application/vnd.ms-excel' => 'bi-file-earmark-spreadsheet',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => 'bi-file-earmark-spreadsheet',
//Image
'image/jpeg' => 'bi-file-earmark-image',
'image/png' => 'bi-file-earmark-image',

View File

@@ -529,11 +529,13 @@ function getIconFromType(type) {
'text/html': 'bi-filetype-html',
'application/msword': 'bi-file-earmark-word',
'application/pdf': 'bi-file-earmark-pdf',
'application/vnd.oasis.opendocument.text': 'bifile--earmark-text',
'application/vnd.oasis.opendocument.text': 'bi-file-earmark-text',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'bi-file-earmark-text',
'application/epub+zip': 'bi-file-earmark-text',
//Spreadsheet
'application/vnd.oasis.opendocument.spreadsheet': 'bi-file-earmark-spreadsheet',
'application/vnd.ms-excel': 'bi-file-earmark-spreadsheet',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'bi-file-earmark-spreadsheet',
//Image
'image/jpeg': 'bi-file-earmark-image',
'image/png': 'bi-file-earmark-image',

View File

@@ -141,11 +141,13 @@ function getIconFromType(type) {
'text/html': 'bi-filetype-html',
'application/msword': 'bi-file-earmark-word',
'application/pdf': 'bi-file-earmark-pdf',
'application/vnd.oasis.opendocument.text': 'bifile--earmark-text',
'application/vnd.oasis.opendocument.text': 'bi-file-earmark-text',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'bi-file-earmark-text',
'application/epub+zip': 'bi-file-earmark-text',
//Spreadsheet
'application/vnd.oasis.opendocument.spreadsheet': 'bi-file-earmark-spreadsheet',
'application/vnd.ms-excel': 'bi-file-earmark-spreadsheet',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'bi-file-earmark-spreadsheet',
//Image
'image/jpeg': 'bi-file-earmark-image',
'image/png': 'bi-file-earmark-image',