From 10c203ec5f65377cce6543546b7a0199d5fb4606 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 23 Jul 2025 08:16:20 +0200 Subject: [PATCH] API: update x evitare svg nel name (calc e retrieve) --- EgwCoreLib.Lux.Data/Services/ImageCacheService.cs | 2 ++ Lux.API/Controllers/WindowController.cs | 12 ++++++++++++ Lux.API/Lux.API.csproj | 2 +- Lux.API/appsettings.json | 5 ++++- Resources/ChangeLog.html | 2 +- Resources/VersNum.txt | 2 +- Resources/manifest.xml | 2 +- 7 files changed, 22 insertions(+), 5 deletions(-) diff --git a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs index 2871e639..e4085625 100644 --- a/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs +++ b/EgwCoreLib.Lux.Data/Services/ImageCacheService.cs @@ -22,6 +22,8 @@ namespace EgwCoreLib.Lux.Data.Services Log.Info("ImageCache Service Started"); } + private string imageBaseUrl = ""; + #endregion Public Constructors #region Public Methods diff --git a/Lux.API/Controllers/WindowController.cs b/Lux.API/Controllers/WindowController.cs index c0ccecd1..453cc62e 100644 --- a/Lux.API/Controllers/WindowController.cs +++ b/Lux.API/Controllers/WindowController.cs @@ -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); diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index 22d2e42d..8eade94d 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2507.2219 + 0.9.2507.2308 diff --git a/Lux.API/appsettings.json b/Lux.API/appsettings.json index 54b00065..32198cbd 100644 --- a/Lux.API/appsettings.json +++ b/Lux.API/appsettings.json @@ -59,6 +59,9 @@ "ServerConf": { "PubChannel": "EgwEngineInput", "SubChannel": "EgwEngineOutput", - "BaseUrl": "/lux/srv/" + "BaseUrl": "/lux/srv/", + "ImageBaseUrl": "https://iis01.egalware.com/lux/srv/api/window/", + "ImageLiveTag": "svg", + "ImageFileTag": "svgfile" } } diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index 313e6457..6d6a1cbe 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2507.2219

+

Versione: 0.9.2507.2308


Note di rilascio: