more tests

This commit is contained in:
Shish
2009-07-16 20:20:53 +01:00
parent 96e69c4f20
commit 4abf2ac7dd
13 changed files with 233 additions and 127 deletions

View File

@ -150,6 +150,9 @@ class Upload implements Extension {
$event = new DataUploadEvent($user, $file['tmp_name'], $metadata);
try {
send_event($event);
if($event->image_id == -1) {
throw new UploadException("File type not recognised");
}
header("X-Shimmie-Image-ID: ".int_escape($event->image_id));
}
catch(UploadException $ex) {