From c73d471fabccf78dc770e9ad5c8eb471d80ec171 Mon Sep 17 00:00:00 2001 From: bruno Date: Thu, 25 Apr 2024 10:49:45 +0200 Subject: [PATCH] Add file upload --- lib/upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/upload.php b/lib/upload.php index f5f02bd..ed45862 100644 --- a/lib/upload.php +++ b/lib/upload.php @@ -133,7 +133,7 @@ function parseIncomingFiles(): array foreach ($incomingFiles as $incomingFile) { if ($incomingFile["error"] == 0 && is_file($incomingFile["tmp_name"])) { $type = explode("/", $incomingFile["type"]); - if (str_starts_with($type, "image")) { + if ($type[0] == "image") { echo "Adding " . $incomingFile["name"]; $imgFname = pathinfo($incomingFile["name"], PATHINFO_FILENAME); $uploadPath = getUploadPath("image", $imgFname);