diff --git a/src/DataSource/Interpreter/CsvFileInterpreter.php b/src/DataSource/Interpreter/CsvFileInterpreter.php index 90de3f27..8266aaad 100644 --- a/src/DataSource/Interpreter/CsvFileInterpreter.php +++ b/src/DataSource/Interpreter/CsvFileInterpreter.php @@ -72,7 +72,8 @@ public function fileValid(string $path, bool $originalFilename = false): bool } } - $csvMimes = ['text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain']; + // csv that has html tags might be recognized as text/html + $csvMimes = ['text/html','text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain']; $finfo = finfo_open(FILEINFO_MIME_TYPE); $mime = finfo_file($finfo, $path); finfo_close($finfo);