X-Git-Url: https://git.jacobcasper.com/?p=pics.git;a=blobdiff_plain;f=upload.php;fp=upload.php;h=735f96aa044beb7a136c2d8a4ce203b965bacc7f;hp=295f420d872fad932e46e85629238b7c006fbe87;hb=3220d3ad5b10291371fa7e27a52b203eeeee0309;hpb=cd757b9e825f6f5ed7344f8a39b1b44efeae3207 diff --git a/upload.php b/upload.php index 295f420..735f96a 100644 --- a/upload.php +++ b/upload.php @@ -17,6 +17,10 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $mime_type = $images['type'][$i]; $tmp_file = $images['tmp_name'][$i]; $error = $images['error'][$i]; + if($error != '0') { + http_response_code(400); + die('Upload error'); + } $size = $images['size'][$i]; // strip EXIF $img = new Imagick($tmp_file);