Added more specific upload error message that includes detected mimetype

This commit is contained in:
Matthew Barbour 2020-10-26 07:25:15 -05:00
parent ac2652e729
commit 45d38d8833

View file

@ -462,6 +462,9 @@ class CronUploader extends Extension
// Generate info message
if ($event->image_id == -1) {
if(array_key_exists("mime",$event->metadata)) {
throw new UploadException("File type not recognised (".$event->metadata["mime"]."). Filename: {$filename}");
}
throw new UploadException("File type not recognised. Filename: {$filename}");
} elseif ($event->merged === true) {
$infomsg = "Image merged. ID: {$event->image_id} - Filename: {$filename}";