solve image not loading
This commit is contained in:
parent
bcb0cbc9b9
commit
0e698be3d1
|
|
@ -556,7 +556,6 @@ class UserController extends AbstractController
|
||||||
throw $this->createNotFoundException(self::NOT_FOUND);
|
throw $this->createNotFoundException(self::NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO :remove picture from bucket
|
|
||||||
#[Route('/delete/{id}', name: 'delete', methods: ['GET', 'POST'])]
|
#[Route('/delete/{id}', name: 'delete', methods: ['GET', 'POST'])]
|
||||||
public function delete(int $id, Request $request): Response
|
public function delete(int $id, Request $request): Response
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ class OrganizationsService
|
||||||
|
|
||||||
// 5. Update the user entity with the relative path
|
// 5. Update the user entity with the relative path
|
||||||
// Ensure you store the path relative to your public folder usually
|
// Ensure you store the path relative to your public folder usually
|
||||||
$organization->setLogoUrl($destinationDir . '/' . $customFilename);
|
$organization->setLogoUrl('/'.$destinationDir . '/' . $customFilename);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// 6. Log the critical error as requested
|
// 6. Log the critical error as requested
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ class UserService
|
||||||
|
|
||||||
// 5. Update the user entity with the relative path
|
// 5. Update the user entity with the relative path
|
||||||
// Ensure you store the path relative to your public folder usually
|
// Ensure you store the path relative to your public folder usually
|
||||||
$user->setPictureUrl($destinationDir . '/' . $customFilename);
|
$user->setPictureUrl('/'.$destinationDir . '/' . $customFilename);
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
// 6. Log the critical error as requested
|
// 6. Log the critical error as requested
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue