Implemetanto metodo Upload_logo per caricamento loghi azienda
This commit is contained in:
parent
00c31ceee3
commit
d3cc5b8526
@ -14106,18 +14106,13 @@ namespace ApiPolo.Controllers
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Percorso base su Linux (già presente nella macchina server)
|
// 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"
|
// Cartella azienda, es. "AZI02"
|
||||||
string aziendaFolder = ten2.Trim();
|
string aziendaFolder = ten2.Trim();
|
||||||
|
|
||||||
// Costruisco il percorso completo in modo portabile
|
// Costruisco il percorso completo in modo portabile
|
||||||
string folderPath = Path.Combine(basePath, aziendaFolder);
|
string folderPath = Path.Combine(basePath, aziendaFolder);
|
||||||
|
|
||||||
//// Creo la cartella se non esiste
|
|
||||||
//if (!Directory.Exists(folderPath))
|
|
||||||
// Directory.CreateDirectory(folderPath);
|
|
||||||
|
|
||||||
// Percorso finale del file
|
// Percorso finale del file
|
||||||
string fullPath = Path.Combine(folderPath, file.FileName);
|
string fullPath = Path.Combine(folderPath, file.FileName);
|
||||||
|
|
||||||
@ -14136,7 +14131,6 @@ namespace ApiPolo.Controllers
|
|||||||
message = "Logo caricato con successo",
|
message = "Logo caricato con successo",
|
||||||
url = fileUrl,
|
url = fileUrl,
|
||||||
fileName = file.FileName,
|
fileName = file.FileName,
|
||||||
savedPath = fullPath // 👈 aggiunto per debug
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
"Secret": "ByYM000OLlMQG6VVVp1OH7Xzyr7gHuw1qvUC5dcGt3SNM"
|
"Secret": "ByYM000OLlMQG6VVVp1OH7Xzyr7gHuw1qvUC5dcGt3SNM"
|
||||||
},
|
},
|
||||||
"Percorsi": {
|
"Percorsi": {
|
||||||
"PathLogo": "/zucchetti/api/api-vt.poloinformatico.it/app/wwwroot/VIRTU",
|
"PathLogo": "./wwwroot/VIRTU",
|
||||||
"PublicBaseUrl": "https://api-vt.poloinformatico.it/VIRTU/"
|
"PublicBaseUrl": "https://api-vt.poloinformatico.it/VIRTU/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user