Added more specific upload error message that includes detected mimetype
This commit is contained in:
parent
ac2652e729
commit
45d38d8833
@ -462,6 +462,9 @@ class CronUploader extends Extension
|
|||||||
|
|
||||||
// Generate info message
|
// Generate info message
|
||||||
if ($event->image_id == -1) {
|
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}");
|
throw new UploadException("File type not recognised. Filename: {$filename}");
|
||||||
} elseif ($event->merged === true) {
|
} elseif ($event->merged === true) {
|
||||||
$infomsg = "Image merged. ID: {$event->image_id} - Filename: {$filename}";
|
$infomsg = "Image merged. ID: {$event->image_id} - Filename: {$filename}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user