Check if file had been uploaded.
This commit is contained in:
@@ -7,6 +7,9 @@
|
||||
* @throws HappyAlert
|
||||
*/
|
||||
function updateAvatar(int $group = 0) {
|
||||
if (!array_key_exists("pp", $_FILES)) {
|
||||
throw new AngryAlert("Geen afbeelding meegegeven!");
|
||||
}
|
||||
$publicDir = "/var/www/html/public/";
|
||||
$tmpImg = $_FILES["pp"]["tmp_name"];
|
||||
$avatarDir = $group ? "uploads/groupavatar/" : "uploads/profilepictures/";
|
||||
|
||||
@@ -62,6 +62,7 @@ $groupinfo = getGroupSettings($_GET["groupID"]);
|
||||
name="pp"
|
||||
accept="image/*"
|
||||
size="4000000"
|
||||
required
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
|
||||
Reference in New Issue
Block a user