Hi,
I’m using Typo3 13.4 and I’d like to upload some xlsx-files to provide them for a download.
The BE refuses to upload them because of the MIME-type. It took me hours for now to find a solution, but non of the hints I found did work.
Could somebody help me?
Sure:
What’s the exact TYPO3 version? What’s the exact error message you get?
What’s your TYPO3_CONF_VARS.SYS.miscfile_ext set to, does it include “xlsx”?
And what’s your TYPO3_CONF_VARS.SYS.FileInfo.mimeTypeCompatibility set to?
Thanks. My answers:
- I’m using 13.4.24.
- Error:
Mime-Typ “application/octet-stream” für Dateierweiterung “xlsx” nicht zulässig (erwartet: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet). - miscfile_ext = 7z,doc,docm,docx,dot,dotm,dotx,epub,gz,ics,mobi,odp,ods,odt,potm,potx,ppam,pps,ppsm,ppsx,ppt,pptm,pptx,rar,sldm,sldx,tar,vcard,vcf,xlam,xls,xlsb,xlsm,xlsx,xlt,xltm,xltx,zip
- application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
-
xlam = application/vnd.ms-excel.addin.macroenabled.12
-
xlsb = application/vnd.ms-excel.sheet.binary.macroenabled.12
-
xlsm = application/vnd.ms-excel.sheet.macroenabled.12
-
xltm = application/vnd.ms-excel.template.macroenabled.12
-
xltx = application/vnd.openxmlformats-officedocument.spreadsheetml.template
-
So, 4. shows that xlsx is missing? Why, and where do I have to set that?
This I’ve added to additional.php:
<?php defined('TYPO3') or die(); $GLOBALS\['TYPO3_CONF_VARS'\]\['SYS'\]\['FileInfo'\]\['fileExtensionToMimeType'\]\['xlsx'\] = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/octet-stream';The problem is that your webserver / PHP detects the xlsx file as application/octet-stream.
That means either the file is NOT really a XLSX file, or your servers mime:magic file and/or compiled PHP does not know all magic markers for the xlsx file.
Have you tried another xlsx file? Can you share the file for analysis?
OK, I have tried an older xlsx-file - this works.
The difference is that I now use PlanMaker from SoftMaker instead of Microsoft.
I stored the old file with PlanMaker and this makes the change.
I’d like to contact the SoftMaker support. May be you are able to provide me some information on the problem, if it doesn’t need much afford.
So in case, you may download that little file (I hope it wasn’t changed by google again):