From d3cc5b85262e932f97978eb3d87bf58a94c53fec Mon Sep 17 00:00:00 2001 From: michele Date: Fri, 3 Oct 2025 11:23:45 +0200 Subject: [PATCH] Implemetanto metodo Upload_logo per caricamento loghi azienda --- ApiPolo/Controllers/PoloController.cs | 8 +------- ApiPolo/appsettings.json | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ApiPolo/Controllers/PoloController.cs b/ApiPolo/Controllers/PoloController.cs index 7e47355..480770d 100644 --- a/ApiPolo/Controllers/PoloController.cs +++ b/ApiPolo/Controllers/PoloController.cs @@ -14106,18 +14106,13 @@ namespace ApiPolo.Controllers try { // Percorso base su Linux (già presente nella macchina server) - string basePath = "/zucchetti/api/api-vt.poloinformatico.it/app/wwwroot/VIRTU"; + string basePath = _configuration["Percorsi:PathLogo"]; // Cartella azienda, es. "AZI02" string aziendaFolder = ten2.Trim(); // Costruisco il percorso completo in modo portabile string folderPath = Path.Combine(basePath, aziendaFolder); - - //// Creo la cartella se non esiste - //if (!Directory.Exists(folderPath)) - // Directory.CreateDirectory(folderPath); - // Percorso finale del file string fullPath = Path.Combine(folderPath, file.FileName); @@ -14136,7 +14131,6 @@ namespace ApiPolo.Controllers message = "Logo caricato con successo", url = fileUrl, fileName = file.FileName, - savedPath = fullPath // 👈 aggiunto per debug }); } catch (Exception ex) diff --git a/ApiPolo/appsettings.json b/ApiPolo/appsettings.json index ecbfb42..5be9820 100644 --- a/ApiPolo/appsettings.json +++ b/ApiPolo/appsettings.json @@ -25,7 +25,7 @@ "Secret": "ByYM000OLlMQG6VVVp1OH7Xzyr7gHuw1qvUC5dcGt3SNM" }, "Percorsi": { - "PathLogo": "/zucchetti/api/api-vt.poloinformatico.it/app/wwwroot/VIRTU", + "PathLogo": "./wwwroot/VIRTU", "PublicBaseUrl": "https://api-vt.poloinformatico.it/VIRTU/" } }