adaptation pour minio

This commit is contained in:
Arnaud Fornerot 2022-08-31 11:20:22 +02:00
parent d2fde8a871
commit d539a2a740
23 changed files with 66 additions and 205 deletions

View File

@ -2,7 +2,13 @@ oneup_uploader:
mappings:
avatar:
frontend: dropzone
storage:
directory: "%kernel.project_dir%/var/tmp/avatar"
logo:
frontend: dropzone
storage:
directory: "%kernel.project_dir%/var/tmp/logo"
header:
frontend: dropzone
storage:
directory: "%kernel.project_dir%/var/tmp/header"

View File

@ -1,100 +0,0 @@
<?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
use App\Entity\Tallyday as Tallyday;
class CleanCommand extends Command
{
private $container;
private $em;
private $output;
private $filesystem;
private $rootlog;
public function __construct(ContainerInterface $container,EntityManagerInterface $em)
{
parent::__construct();
$this->container = $container;
$this->em = $em;
}
protected function configure()
{
$this
->setName('app:Clean')
->setDescription('Nettoyage des données obsolètes')
->setHelp('Nettoyage des données obsolètes')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->output = $output;
$this->filesystem = new Filesystem();
$this->rootlog = $this->container->get('kernel')->getLogDir()."/";
$alias = $this->container->getParameter('appAlias');
$this->writelnred('');
$this->writelnred('== app:Clean');
$this->writelnred('==========================================================================================================');
$now=new \DateTime('now');
$directory=$this->container->get('kernel')->getProjectDir()."/public/uploads/avatar";
$this->writeln($directory);
$files=[];
$fs = new Filesystem();
if($fs->exists($directory)) {
$finder = new Finder();
$finder->in($directory)->files();
foreach (iterator_to_array($finder) as $file) {
$name = $file->getRelativePathname();
if($name!="admin.jpg"&&$name!="noavatar.png"&&$name!="system.jpg") {
$entity=$this->em->getRepository("App\Entity\User")->findBy(["avatar"=>$name]);
if(!$entity) {
$this->writeln($name);
$url=$directory."/".$name;
if($fs->exists($url)) {
$fs->remove($url);
}
}
}
}
}
$fs = new Filesystem();
$users=$this->em->getRepository("App\Entity\User")->findAll();
foreach($users as $user) {
if(!$fs->exists($directory."/".$user->getAvatar())) {
$this->writeln($user->getUsername());
$user->setAvatar("noavatar.png");
$this->em->persist($user);
$this->em->flush();
}
}
$this->writeln('');
return Command::SUCCESS;
}
private function writelnred($string) {
$this->output->writeln('<fg=red>'.$string.'</>');
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
}
private function writeln($string) {
$this->output->writeln($string);
$this->filesystem->appendToFile($this->rootlog.'cron.log', $string."\n");
}
}

View File

@ -487,22 +487,7 @@ class InitCommand extends Command
);
$output->writeln('');
// Job de purge des fichiers obsolète
// Toute les 24h à 3h00
$entity = $this->em->getRepository('App\Entity\Cron')->findOneBy(["command"=>"app:Clean"]);
if(!$entity) {
$entity = new Cron;
$nextdate=$entity->getSubmitdate();
$nextdate->setTime(3,0);
$entity->setCommand("app:Clean");
$entity->setDescription("Nettoyage des données obsolètes");
$entity->setStatut(1);
$entity->setRepeatinterval(86400);
$entity->setNextexecdate($nextdate);
$this->em->persist($entity);
}
// Job synchronisation des comptes utilisateur
// Toute les 24h à 3h00
$entity = $this->em->getRepository('App\Entity\Cron')->findOneBy(["command"=>"app:Synchro"]);

View File

@ -38,7 +38,7 @@ class CropController extends AbstractController
{
// Récupération de l'image à cropper
$file=$request->query->get('file');
$large_image_location = "uploads/$type/$file";
$large_image_location=$this->minio->download($type."/".$file,$type."/".$file,true);
// Récupérer les tailles de l'image
$width = $this->getWidth($large_image_location);
@ -72,13 +72,14 @@ class CropController extends AbstractController
$ratio="1:1";
break;
}
if($max_height>0) {
$scale = $max_height/$height;
if(($width*$scale)>$max_width) {
$scale = $max_width/$width;
}
$this->resizeImage($large_image_location,$width,$height,$scale);
$this->minio->upload($large_image_location,$type."/".$file,false);
}
else $scale=1;
@ -103,12 +104,12 @@ class CropController extends AbstractController
if ($form->get('submit')->isClicked() && $form->isValid()) {
// Récupération des valeurs du formulaire
$data = $form->getData();
$thumb_image_location = "uploads/$type/thumb_".$file;
$tmpdir=$this->appKernel->getProjectDir()."/var/tmp";
$thumb_image_location = "$tmpdir/$type/thumb_".$file;
$cropped = $this->resizeThumbnailImage($thumb_image_location, $large_image_location,$data["ws"],$data["hs"],$data["xs"],$data["ys"],$scale);
// Dépot des fichiers sur minio
$this->minio->upload($large_image_location,$large_image_location,true);
$this->minio->upload($thumb_image_location,$thumb_image_location,true);
$this->minio->upload($thumb_image_location,$type."/thumb_".$file,false);
$submited=true;
}
@ -186,10 +187,13 @@ class CropController extends AbstractController
list($imagewidth, $imageheight, $imageType) = getimagesize($image);
$imageType = image_type_to_mime_type($imageType);
$newImageWidth = ceil($width * $scale);
$newImageHeight = ceil($height * $scale);
$newImageWidth=900;
$newImageHeight=900;
$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);
switch($imageType) {
case "image/gif":
$source=imagecreatefromgif($image);
@ -197,6 +201,7 @@ class CropController extends AbstractController
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
dump("here");
$source=imagecreatefromjpeg($image);
break;
case "image/png":
@ -204,7 +209,9 @@ class CropController extends AbstractController
$source=imagecreatefrompng($image);
break;
}
imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);
$ok=imagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);
switch($imageType) {
case "image/gif":
imagegif($newImage,$thumb_image_name);
@ -212,14 +219,16 @@ class CropController extends AbstractController
case "image/pjpeg":
case "image/jpeg":
case "image/jpg":
imagejpeg($newImage,$thumb_image_name,90);
dump($thumb_image_name);
imagejpeg($newImage,$thumb_image_name,100);
break;
case "image/png":
case "image/x-png":
imagepng($newImage,$thumb_image_name);
break;
}
chmod($thumb_image_name, 0640);
chmod($thumb_image_name, 0640);
return $thumb_image_name;
}

View File

@ -160,7 +160,7 @@ class GroupController extends AbstractController
$userinfo="";
if($data->getOwner()) {
$userinfo.="<img src='".$this->generateUrl('app_minio_image',["file"=>"uploads/avatar/".$data->getOwner()->getAvatar()])."' class='avatar'>";
$userinfo.="<img src='".$this->generateUrl('app_minio_image',["file"=>"avatar/".$data->getOwner()->getAvatar()])."' class='avatar'>";
$userinfo.="<br>".$data->getOwner()->getUsername();
}
@ -513,7 +513,7 @@ class GroupController extends AbstractController
$action.="<a style='cursor:pointer' onClick='addUsers(".$data->getId().")'><i class='fa fa-plus fa-fw'></i></a>";
// Avatar
$avatar="<img src='".$this->generateUrl('app_minio_image',["file"=>"uploads/avatar/".$data->getAvatar()])."' class='avatar'>";
$avatar="<img src='".$this->generateUrl('app_minio_image',["file"=>"avatar/".$data->getAvatar()])."' class='avatar'>";
array_push($output["data"],array("DT_RowId"=>"user".$data->getId(),$action,$avatar,$data->getUsername(),$data->getEmail(),"",""));
}
@ -647,7 +647,7 @@ class GroupController extends AbstractController
$action.="<a style='cursor:pointer' onClick='delUsers(".$data->getId().")'><i class='fa fa-minus fa-fw'></i></a>";
// Avatar
$avatar="<img src='".$this->generateUrl('app_minio_image',["file"=>"uploads/avatar/".$data->getAvatar()])."' class='avatar'>";
$avatar="<img src='".$this->generateUrl('app_minio_image',["file"=>"avatar/".$data->getAvatar()])."' class='avatar'>";
// Flag manager
$rolegroup="";

View File

@ -27,15 +27,13 @@ class MinioController extends AbstractController
// Répertoire de Destination
$fs = new Filesystem();
$rootdir = $this->getParameter('kernel.project_dir') . '/public';
$fs->mkdir($rootdir."/uploads/ckeditor");
$rootdir = $this->getParameter('kernel.project_dir') . '/var/tmp';
$fs->mkdir($rootdir."/ckeditor");
// Fichier cible
$targetName = uniqid().".".$extention;
$targetFile = "uploads/ckeditor/".$targetName;
$targetUrl = $this->getParameter('appAlias')."uploads/ckeditor/".$targetName;
$targetUrl = $this->generateUrl('app_minio_document',["file"=>"uploads/ckeditor/".$targetName]);
$message = "";
$targetFile = "ckeditor/".$targetName;
$targetUrl = $this->generateUrl('app_minio_document',["file"=>"ckeditor/".$targetName]);
//move_uploaded_file($tmpfile,$targetFile);
$this->minio->upload($tmpfile,$targetFile,true);
@ -49,19 +47,19 @@ class MinioController extends AbstractController
public function logo(Request $request): Response {
return $this->redirectToRoute("app_minio_image",["file"=>"uploads/logo/".$request->getSession()->get("logolight")]);
return $this->redirectToRoute("app_minio_image",["file"=>"logo/".$request->getSession()->get("logolight")]);
}
public function image(Request $request): Response
{
$file=$request->query->get("file");
switch($file) {
case "uploads/avatar/admin.jpg":
case "uploads/avatar/noavatar.png":
case "uploads/avatar/system.jpg":
case "uploads/header/header.jpg":
case "uploads/logo/logo.png":
$file = str_replace("uploads","medias",$file);
case "avatar/admin.jpg":
case "avatar/noavatar.png":
case "avatar/system.jpg":
case "header/header.jpg":
case "logo/logo.png":
$file = "medias/".$file;
$filePath = $file;
$content = file_get_contents($file);
break;
@ -73,15 +71,10 @@ class MinioController extends AbstractController
$content = file_get_contents($file);
}
// C'est du contenu dynamique on download depuis minio
elseif(stripos($file,"uploads")===0) {
else {
$filePath = $this->minio->download($file, $file, true);
$content = file_get_contents($filePath);
}
// C'est du contenu statique on download depuis minio
else {
$filePath = $file;
$content = file_get_contents($file);
}
break;
}

View File

@ -22,7 +22,7 @@ class PublishController extends AbstractController
$ret["from"]["id"]=$this->getUser()->getId();
$ret["from"]["username"]=$this->getUser()->getUsername();
$ret["from"]["displayname"]=$this->getUser()->getDisplayname();
$ret["from"]["avatar"]=$this->generateUrl('app_minio_image',["file"=>"uploads/avatar/".$this->getUser()->getAvatar()]);
$ret["from"]["avatar"]=$this->generateUrl('app_minio_image',["file"=>"avatar/".$this->getUser()->getAvatar()]);
$update = new Update(

View File

@ -399,7 +399,7 @@ class RestController extends AbstractFOSRestController
$output["userposition"]=$user->getPosition();
$output["userpostaladress"]=$user->getPostaladress();
$output["usertelephonenumber"]=$user->getTelephonenumber();
$output["useravatar"]="https://".str_replace("//","/",$this->getParameter("appWeburl").$this->getParameter("appAlias").$this->generateUrl('app_minio_image',["file"=>"uploads/avatar/".$user->getAvatar()],true));
$output["useravatar"]="https://".str_replace("//","/",$this->getParameter("appWeburl").$this->getParameter("appAlias").$this->generateUrl('app_minio_image',["file"=>"avatar/".$user->getAvatar()],true));
$output["userniveau01"]=$this->niveau01Format($user->getNiveau01());
$output["userniveau02"]=$this->niveau02Format($user->getNiveau02());
$output["usergroups"]=[];

View File

@ -255,7 +255,7 @@ class UserController extends AbstractController
$tmp=array();
if($access=="admin"||$access=="modo") array_push($tmp,$action);
array_push($tmp,"<img src='".$this->generateUrl('app_minio_image',["file"=>"uploads/avatar/".$data->getAvatar()])."' class='avatar'>");
array_push($tmp,"<img src='".$this->generateUrl('app_minio_image',["file"=>"avatar/".$data->getAvatar()])."' class='avatar'>");
array_push($tmp,$data->getUsername());
array_push($tmp,$data->getLastname());

View File

@ -29,7 +29,7 @@
foreach($configs as $config) {
$session->set($config->getId(), strval($config->getValue()));
}
$session->set("headerimage","uploads/header/".$session->get("headerimage"));
$session->set("headerimage","header/".$session->get("headerimage"));
// Calcul couleur
$session->set("colorbgbodylight-darker", $this->adjustBrightness($session->get("colorbgbodylight"),-10));

View File

@ -45,7 +45,6 @@ class MinioService
'SaveAs' => $tmpdir.'/'.$filename,
]);
} catch (S3Exception $e) {
dump($e);
switch ($e->getResponse()->getStatusCode()) {
case 404:
throw new NotFoundHttpException($this->translator->trans(self::ERR_FILE_NOT_FOUND, [], 'messages'));
@ -91,7 +90,8 @@ class MinioService
}
if ($deleteSource) {
unlink($file);
$tmpdir=$this->rootPath."/var/tmp";
@unlink($tmpdir."/".$filename);
}
}
@ -112,8 +112,6 @@ class MinioService
]);
} catch (Exception $e) {
\Sentry\captureException($e);
dump($this->minioRoot.$to);
dump($e->getMessage());
throw new Exception(self::ERR_UNAVAILABLE);
}
@ -231,7 +229,6 @@ class MinioService
]);
}
} catch (Exception $e) {
dump($e->getMessage());
throw new Exception(self::ERR_UNAVAILABLE);
}
}

View File

@ -79,20 +79,13 @@ class UploadListener
$type=$event->getType();
switch($type) {
case "logo":
$file=$event->getFile();
$filename=$file->getFilename();
$response = $event->getResponse();
$response['file'] = $filename;
$this->minio->upload($file,"uploads/logo/".$filename,true);
break;
default:
$file=$event->getFile();
$filename=$file->getFilename();
$response = $event->getResponse();
$response['file'] = $filename;
$this->minio->upload($file,$type."/".$filename,true);
break;
}
}

View File

@ -10,13 +10,6 @@ class AppExtension extends AbstractExtension
{
protected $container;
public function getFilters()
{
return [
new TwigFilter('urlavatar', [$this, 'urlavatar']),
];
}
public function getFunctions()
{
return [
@ -24,15 +17,6 @@ class AppExtension extends AbstractExtension
];
}
public function urlavatar($avatar)
{
if(stripos($avatar,"http")===0)
return $avatar;
else
return $this->container->getParameter("appAlias")."uploads/avatar/".$avatar;
}
public function getUniqueId() {
return str_replace("-","",Uuid::uuid4());
}

View File

@ -60,19 +60,14 @@
{% set color = app.session.get('colorbgbodylight') %}
{% endif %}
<img id="config_value_img" src="{{ path("app_minio_image",{file:"uploads/logo/"~config.value}) }}" style="background-color: {{color}}; width:90px;height:90px; margin:auto;display:block;">
<img id="config_value_img" src="{{ path("app_minio_image",{file:"logo/"~config.value}) }}" style="background-color: {{color}}; width:90px;height:90px; margin:auto;display:block;">
<a class="btn btn-info btn-modal" style="width:90px" data-modalid="mymodallarge" data-modaltitle="Logo" data-modalurl="{{ path('app_admin_config_logo') }}" title='Ajouter un Logo'>Modifier</a>
</div>
{% elseif config.type=="header" %}
<div style="margin:10px auto;">
<img id="config_value_img" src="{{ path("app_minio_image",{file:"uploads/header/"~config.value}) }}" style="width:100%;margin:auto;display:block;">
<img id="config_value_img" src="{{ path("app_minio_image",{file:"header/"~config.value}) }}" style="width:100%;margin:auto;display:block;">
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Bannière" data-modalurl="{{ path('app_user_crop01', {"type": "header", "reportinput": "#config_value" }) }}" title='Ajouter une Bannière'>Modifier</a>
</div>
{% elseif config.type=="image" %}
<div style="margin:10px auto;">
<img id="config_value_img" src="{{ path("app_minio_image",{file:"uploads/hero/"~config.value}) }}" style="width:100%;margin:auto;display:block;">
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Image" data-modalurl="{{ path('app_user_crop01', {"type": "image", "reportinput": "#config_value" }) }}" title='Ajouter une Image'>Modifier</a>
</div>
{% endif %}
{{ form_row(form.help) }}
</div>
@ -84,7 +79,7 @@
{% block localjavascript %}
$("#config_value_img").on('error', function(){
var imgSrc = $(this).attr('src');
if(imgSrc!="/{{appAlias}}/uploads/{{config.type}}/")
if(imgSrc!="/{{appAlias}}/{{config.type}}/")
$(this).attr('src',imgSrc);
});
$('#mymodallarge').on('hidden.bs.modal', function () {

View File

@ -24,7 +24,7 @@
<script>
function dropzonesuccess( file, response ) {
parent.$("#config_value").val(response["file"]);
parent.$("#config_value_img").attr("src","{{ path("app_minio_image",{file:"uploads/logo/"}) }}"+response["file"]);
parent.$("#config_value_img").attr("src","{{ path("app_minio_image",{file:"logo/"}) }}"+response["file"]);
closeModal();
}

View File

@ -68,11 +68,11 @@
{%endif%}
{% elseif config.type=="logo" %}
{%if not val is empty %}
<img src="{{path("app_minio_image",{file:"uploads/logo/"~val}) }}" height=50px>
<img src="{{path("app_minio_image",{file:"logo/"~val}) }}" height=50px>
{% endif %}
{% elseif config.type=="header" %}
{%if not val is empty %}
<img src="{{ path("app_minio_image",{file:"uploads/header/"~val}) }}" width="100%">
<img src="{{ path("app_minio_image",{file:"header/"~val}) }}" width="100%">
{% endif %}
{% else %}
{{ val|raw }}

View File

@ -21,7 +21,7 @@
{% endif %}
<div id='preview' style='overflow:hidden; {{class}} position: absolute; top: 0px; right: 10px;'>
<img src="{{ appAlias }}uploads/{{type}}/{{ file }}" style='position: relative;' alt='Thumbnail Preview' />
<img src="{{ path('app_minio_image',{file:type~"/"~file}) }}" style='position: relative;' alt='Thumbnail Preview' />
</div>
<div style="width:100%; margin:65px auto 0px auto;">
@ -79,7 +79,7 @@
window.parent.location.reload();
{% elseif reportinput != "none" %}
window.parent.$("{{ reportinput }}").val("thumb_{{ file }}");
window.parent.$("{{ reportinput }}_img").attr("src","{{ path("app_minio_image",{file:"uploads/"~type~"/thumb_"~file}) }}");
window.parent.$("{{ reportinput }}_img").attr("src","{{ path("app_minio_image",{file:type~"/thumb_"~file}) }}");
{% endif %}
closeModal();
@ -105,7 +105,7 @@
resizewidth=$('#largeimg').width();
$('#largeimg').CropSelectJs({
imageSrc: "{{ appAlias }}uploads/{{type}}/{{ file }}",
imageSrc: "{{ path('app_minio_image',{file:type~"/"~file}) }}",
selectionResize: function(data) { resize(data); },
selectionMove: function(data) { move(data); },
});

View File

@ -2,7 +2,7 @@
{% block body %}
<div style="text-align:center">
<img src="{{ path('app_minio_image',{file:"uploads/logo/"~app.session.get("logolight")}) }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logolight")}) }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
<h1 style="border:none">{{app.session.get('appname')}}</h1>
{% if mode=="SQL" %}
{% set route="app_hydra_checkloginsql" %}

View File

@ -2,7 +2,7 @@
{% block body %}
<div style="text-align:center">
<img src="{{ path('app_minio_image',{file:"uploads/logo/"~app.session.get("logolight")}) }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logolight")}) }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
<h1 style="border:none">{{app.session.get('appname')}}</h1>
{{ form_start(form, {'action': path('app_loginldapcheck'), 'method': 'POST'}) }}
<div class="card homecard mb-3" style="width:400px; margin:auto; text-align: left;">

View File

@ -4,7 +4,7 @@
{% block body %}
<div style="text-align:center">
<img src="{{ path('app_minio_image',{file:"uploads/logo/"~app.session.get("logolight")}) }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logolight")}) }}" style="height:120px;margin-top:10px;margin-bottom:20px;">
<h1 style="border:none">{{app.session.get('appname')}}</h1>
<form action="{{ path('app_login') }}" method="post">
<div class="card homecard mb-3" style="width:400px; margin:auto">

View File

@ -18,7 +18,6 @@
--colorbgbodydark-darker: {{ app.session.get('colorbgbodydark-darker')|raw }};
--colorfttitlelight-darker: {{ app.session.get('colorfttitlelight-darker')|raw }};
--header: url("\{{ appAlias }}\uploads\header\{{ app.session.get('headerimage')|raw }}");
--colorbgbodydark-rgb: {{ app.session.get('colorbgbodydark-rgb')|raw }};
}
</style>

View File

@ -65,7 +65,7 @@
{% if user.avatar %}
{% set avatar= user.avatar %}
{% endif %}
<img id="user_avatar_img" src="{{ path('app_minio_image',{file:"uploads/avatar/"~avatar}) }}" style="max-width:90px;background-color:var(--colorbgbodydark);">
<img id="user_avatar_img" src="{{ path('app_minio_image',{file:"avatar/"~avatar}) }}" style="max-width:90px;background-color:var(--colorbgbodydark);">
{{ form_widget(form.avatar) }}
<a class="btn btn-info btn-modal" style="width:100%" data-modalid="mymodallarge" data-modaltitle="Avatar" data-modalurl="{{ path('app_user_crop01', {"type": "avatar", "reportinput": "#user_avatar" }) }}" title='Ajouter un Avatar'>Modifier</a>
</div>

View File

@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html"; charset="utf-8" />
<title>{% block title %}{{app.session.get("appname")}}{% endblock %}</title>
<link rel="shortcut icon" href="{{ path('app_minio_image',{file:"uploads/logo/"~app.session.get("logodark")}) }}" />
<link rel="shortcut icon" href="{{ path('app_minio_image',{file:"logo/"~app.session.get("logodark")}) }}" />
{{ encore_entry_link_tags('app') }}
@ -25,7 +25,7 @@
{% if useheader is defined and useheader and (app.session.get("fgheader") or not app.user) %}
<div id="header" class="d-flex align-items-center" style="height:{{app.session.get("headerheight")}}px; background-image: linear-gradient(90deg,rgba(var(--colorbgbodydark-rgb),1),rgba(var(--colorbgbodydark-rgb),0.1)),url({{ path('app_minio_image',{file:app.session.get("headerimage")}) }});background-size:cover">
<a href="{{ path('app_home')}}">
<img src="{{ path('app_minio_image',{file:"uploads/logo/"~app.session.get("logodark")}) }}" style="height:{{app.session.get("headerheight")-20}}px;margin-left:10px; max-height:120px;">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logodark")}) }}" style="height:{{app.session.get("headerheight")-20}}px;margin-left:10px; max-height:120px;">
</a>
<h1 class="flex-grow-1">
@ -40,7 +40,7 @@
<nav class="nav">
{% if app.user %}
<a class="nav-link" href="{{path("app_user_user")}}" title="Mon Profil">
<img src="{{ path('app_minio_image',{file:"uploads/avatar/"~app.user.avatar}) }}" class="avatar" style="width:35px;height:35px;">
<img src="{{ path('app_minio_image',{file:"avatar/"~app.user.avatar}) }}" class="avatar" style="width:35px;height:35px;">
</a>
{% if is_granted('ROLE_ADMIN') %}
@ -80,7 +80,7 @@
<nav id="menu" class="navbar navbar-expand p-0" style="{{style}}">
<a class="nav-link navbar-logo" href="{{ path('app_home')}}" style="display:none">
<img src="{{ path('app_minio_image',{file:"uploads/logo/"~app.session.get("logodark")}) }}">
<img src="{{ path('app_minio_image',{file:"logo/"~app.session.get("logodark")}) }}">
</a>
<a class="nav-link " href="{{ path('app_home')}}">Accueil</a>
@ -98,7 +98,7 @@
<ul id="menulink" class="nav navbar-right pe-3" style="display:none;">
{% if app.user %}
<a href="{{path("app_user_user")}}">
<img src="{{ path('app_minio_image',{file:"uploads/avatar/"~app.user.avatar}) }}" class="avatar" style="width:25px; height:25px; margin-top:-3px; margin-right:3px;">
<img src="{{ path('app_minio_image',{file:"avatar/"~app.user.avatar}) }}" class="avatar" style="width:25px; height:25px; margin-top:-3px; margin-right:3px;">
</a>
{% if is_granted('ROLE_ADMIN') %}