Implemetanto metodo Upload_logo per caricamento loghi azienda

This commit is contained in:
michele 2025-10-03 11:23:45 +02:00
parent 00c31ceee3
commit d3cc5b8526
2 changed files with 2 additions and 8 deletions

View File

@ -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)

View File

@ -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/"
}
}