From 0e698be3d14328271df49862cd7c5f6a7b9ab04e Mon Sep 17 00:00:00 2001 From: Charles Date: Mon, 2 Feb 2026 10:59:03 +0100 Subject: [PATCH] solve image not loading --- src/Controller/UserController.php | 1 - src/Service/OrganizationsService.php | 2 +- src/Service/UserService.php | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php index 9f82399..b651714 100644 --- a/src/Controller/UserController.php +++ b/src/Controller/UserController.php @@ -556,7 +556,6 @@ class UserController extends AbstractController throw $this->createNotFoundException(self::NOT_FOUND); } -//TODO :remove picture from bucket #[Route('/delete/{id}', name: 'delete', methods: ['GET', 'POST'])] public function delete(int $id, Request $request): Response { diff --git a/src/Service/OrganizationsService.php b/src/Service/OrganizationsService.php index c236ba3..ec7c095 100644 --- a/src/Service/OrganizationsService.php +++ b/src/Service/OrganizationsService.php @@ -53,7 +53,7 @@ class OrganizationsService // 5. Update the user entity with the relative path // Ensure you store the path relative to your public folder usually - $organization->setLogoUrl($destinationDir . '/' . $customFilename); + $organization->setLogoUrl('/'.$destinationDir . '/' . $customFilename); } catch (\Exception $e) { // 6. Log the critical error as requested diff --git a/src/Service/UserService.php b/src/Service/UserService.php index 06c6c70..0fcbada 100644 --- a/src/Service/UserService.php +++ b/src/Service/UserService.php @@ -201,7 +201,7 @@ class UserService // 5. Update the user entity with the relative path // Ensure you store the path relative to your public folder usually - $user->setPictureUrl($destinationDir . '/' . $customFilename); + $user->setPictureUrl('/'.$destinationDir . '/' . $customFilename); } catch (\Exception $e) { // 6. Log the critical error as requested