From 847cbfcc5d58ba76202ce75cccfcb2990b7d7465 Mon Sep 17 00:00:00 2001 From: Tiavina Date: Fri, 31 Jan 2025 16:45:58 +0300 Subject: [PATCH] unique filename on defunt photo --- gestion/lib/Controller/PageController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gestion/lib/Controller/PageController.php b/gestion/lib/Controller/PageController.php index 4865eca..f9fadfd 100644 --- a/gestion/lib/Controller/PageController.php +++ b/gestion/lib/Controller/PageController.php @@ -2787,7 +2787,7 @@ class PageController extends Controller { } $photoName = basename($_FILES["photo"]["name"]); $filename = uniqid() . "_" .$photoName; - $fullPath = $folder.$photoName; + $fullPath = $folder.$filename; $fileContent = file_get_contents($_FILES["photo"]["tmp_name"]); $this->storage->newFile($fullPath,$fileContent); $this->adminStorage->newFile($fullPath,$fileContent); @@ -2819,7 +2819,7 @@ class PageController extends Controller { } $photoName = basename($_FILES["photo"]["name"]); $filename = uniqid() . "_" .$photoName; - $fullPath = $folder.$photoName; + $fullPath = $folder.$filename; $fileContent = file_get_contents($_FILES["photo"]["tmp_name"]); $this->storage->newFile($fullPath,$fileContent); $this->adminStorage->newFile($fullPath,$fileContent);