API: update x evitare svg nel name (calc e retrieve)
This commit is contained in:
@@ -37,6 +37,12 @@ namespace Lux.API.Controllers
|
||||
sw.Start();
|
||||
string svgContent = "";
|
||||
|
||||
// se contiene ".svg" lo levo...
|
||||
if (id.EndsWith(".svg"))
|
||||
{
|
||||
id = id.Replace(".svg", "");
|
||||
}
|
||||
|
||||
// se messaggio vuoto --> uso default!
|
||||
currJwd = string.IsNullOrEmpty(currJwd) ? demoJwd : currJwd;
|
||||
|
||||
@@ -99,6 +105,12 @@ namespace Lux.API.Controllers
|
||||
if (string.IsNullOrEmpty(id))
|
||||
return NotFound();
|
||||
|
||||
// se contiene ".svg" lo levo...
|
||||
if (id.EndsWith(".svg"))
|
||||
{
|
||||
id = id.Replace(".svg", "");
|
||||
}
|
||||
|
||||
string svgContent = await _imgService.LoadSvgAsync(id);
|
||||
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user