Added more specific upload error message that includes detected mimetype
This commit is contained in:
parent
ac2652e729
commit
45d38d8833
1 changed files with 3 additions and 0 deletions
|
@ -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}";
|
||||
|
|
Reference in a new issue