diff --git a/SteUp.Maui/Core/Services/FileManager.cs b/SteUp.Maui/Core/Services/FileManager.cs index 9764249..29bbece 100644 --- a/SteUp.Maui/Core/Services/FileManager.cs +++ b/SteUp.Maui/Core/Services/FileManager.cs @@ -16,15 +16,15 @@ public class FileManager( private async Task ConvertToDto(FileInfo file, AttachedDto.TypeAttached type, bool isFromToUpload) { - var (origUrl, thumbUrl) = await SaveAndCreateThumbAsync( - await File.ReadAllBytesAsync(file.FullName), - file.Name - ); + var bytes = await File.ReadAllBytesAsync(file.FullName); + var (origUrl, thumbUrl) = await SaveAndCreateThumbAsync(bytes, file.Name); return new AttachedDto { Name = file.Name, Path = file.FullName, + // Servono per inviare le foto rimaste in /toUpload (salvate senza rete). + FileBytes = bytes, TempPath = origUrl, ThumbPath = thumbUrl, Type = type, @@ -101,7 +101,9 @@ public class FileManager( foreach (var file in toUploadFiles) { - if (!fileNameFilter.Contains(file.Name)) + // Scheda.ImageNames contiene il percorso completo restituito da SaveInspectionFile: + // confrontando solo il nome le foto salvate e non ancora inviate non comparivano mai. + if (!fileNameFilter.Contains(file.FullName) && !fileNameFilter.Contains(file.Name)) continue; ct.ThrowIfCancellationRequested(); diff --git a/SteUp.Maui/SteUp.Maui.csproj b/SteUp.Maui/SteUp.Maui.csproj index 99fb7f2..d0a1c80 100644 --- a/SteUp.Maui/SteUp.Maui.csproj +++ b/SteUp.Maui/SteUp.Maui.csproj @@ -30,8 +30,8 @@ it.integry.SteUp - 1.2.4 - 10 + 1.2.5 + 11 15.0 diff --git a/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor b/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor index f1c9f65..f62103a 100644 --- a/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor +++ b/SteUp.Shared/Components/SingleElements/Modal/ModalFormScheda.razor @@ -171,7 +171,10 @@ } - @if (item.p.ToUpload && !ReadOnly) + @* Rimovibile anche se gia' salvata o inviata. Non mentre e' + in elaborazione: l'indice della foto serve ancora al + caricamento in background. *@ + @if (!ReadOnly && !item.p.ThumbPath.IsNullOrEmpty()) {