@@ -254,7 +254,7 @@ class ImportDocumentBatch extends Command
|
||||
throw new RuntimeException('File size is outside the 1 byte to 10 MiB import limit.');
|
||||
}
|
||||
$mime = (new \finfo(FILEINFO_MIME_TYPE))->file($path);
|
||||
$allowed = ['application/pdf', 'text/plain', 'text/csv', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
$allowed = ['application/pdf', 'application/json', 'text/plain', 'text/csv', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'image/png', 'image/jpeg', 'image/webp'];
|
||||
if (! is_string($mime) || ! in_array($mime, $allowed, true)) {
|
||||
throw new RuntimeException('Detected media type is not supported by the document library.');
|
||||
|
||||
Reference in New Issue
Block a user