error catch
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s

This commit is contained in:
Chris 2023-10-27 12:06:09 +02:00
parent c720b34c6f
commit 40ae06d4b6

View File

@ -116,6 +116,8 @@ class Dogs extends Page {
$answer = pictshareUploadImage($photo_tmp_name); $answer = pictshareUploadImage($photo_tmp_name);
if($answer['status']=='ok' && in_array($answer['filetype'],['jpeg','png','gif'])) if($answer['status']=='ok' && in_array($answer['filetype'],['jpeg','png','gif']))
$newphoto = $answer['url']; $newphoto = $answer['url'];
else
return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Fehler beim CDN Upload: '.json_decode($answer)]);
} }
else else
return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Die Datei ist zu groß. Bitte eine kleinere Datei hochladen']); return partial('error.html', ['errorTitle' => 'Error', 'errorMessage' => 'Die Datei ist zu groß. Bitte eine kleinere Datei hochladen']);