From 4fc381fd0d73a128d8a95779e973f39fd62a2247 Mon Sep 17 00:00:00 2001 From: ZanSara Date: Fri, 16 Apr 2021 09:53:20 +0200 Subject: [PATCH] Refine index.php --- remote-server/index.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/remote-server/index.php b/remote-server/index.php index df49ef2e..6ca011fc 100644 --- a/remote-server/index.php +++ b/remote-server/index.php @@ -33,9 +33,6 @@ $imagetype = $_FILES['photo']['type']; $imageerror = $_FILES['photo']['error']; $imagetemp = $_FILES['photo']['tmp_name']; - - // Fix Chrome quirk - $config = str_replace('\r\n', '\n', $config); // The single quotes here distinguish a literal \r from a "real" \r, and we want the former // Logs are being uploaded - store them if ($logs){ @@ -46,7 +43,6 @@ } } - // A photo is being uploaded - store it and if needed delete/rename the others if ($imagename){ if(is_uploaded_file($imagetemp)) { @@ -62,7 +58,7 @@ // If a maximum number of photos ia allowed, add a prefix to the current photo if($maxPhotos > 1){ $split_name = explode(".", $imagename); - $imagename = $split_name[0]."__1.".$split_name[1]; + $imagename = $split_name[0]."__0.".$split_name[1]; // Delete the oldest pictures if there are more than maxPhotos pictures $pictures = glob($image_path."*.{jpg,png,gif}", GLOB_BRACE); @@ -131,4 +127,3 @@ echo json_encode($response)."\n"; } ?> -