Le foto venivano zippate tutte in un unico allegato: oltre i 100 MB i servizi rifiutavano l'invio (MaxUploadSizeExceededException) e, costruendo tutto in RAM sul thread della UI, il dispositivo si bloccava. - Invio diviso in più email da massimo ~40 MB ciascuna - Zip scritti su disco una parte alla volta e caricati in streaming - Preparazione in background, avanzamento "parte X di N" - Richiesta se includere le foto, con il loro peso (default: solo i log) - Database inviato insieme al file -wal - Avviso subito se si è offline Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
31 lines
1.4 KiB
C#
31 lines
1.4 KiB
C#
using SteUp.Shared.Core.Dto;
|
|
using SteUp.Shared.Core.Entities;
|
|
|
|
namespace SteUp.Shared.Core.Interface.System;
|
|
|
|
public interface IFileManager
|
|
{
|
|
Task<List<AttachedDto>?> GetInspectionFiles(Ispezione ispezione, List<string> fileNameFilter,
|
|
bool includeToUpload = true, CancellationToken ct = default);
|
|
|
|
Task<string?> SaveInspectionFile(Ispezione ispezione, byte[] file, string fileName, CancellationToken ct = default);
|
|
|
|
string GetFileToUploadDir(Ispezione ispezione, string fileName);
|
|
|
|
bool RemoveInspection(Ispezione ispezione, bool removeAlsoFromFinal = true, bool removeAlsoFromToUpload = true);
|
|
bool RemoveInspectionFile(Ispezione ispezione, string fileName, bool removeAlsoFromFinal = true,
|
|
bool removeAlsoFromToUpload = true);
|
|
|
|
Task<string?> MoveInspectionFileFromToUploadToFinal(Ispezione ispezione, string fileName, bool overwrite = true,
|
|
CancellationToken ct = default);
|
|
|
|
Task<string> SaveToTempStorage(Stream file, string fileName, CancellationToken ct = default);
|
|
Task CleanTempStorageAsync(CancellationToken ct = default);
|
|
Task OpenFile(string fileName, string filePath);
|
|
|
|
Task<(string originalUrl, string thumbUrl)> SaveAndCreateThumbAsync(byte[] bytes, string fileName,
|
|
CancellationToken ct = default);
|
|
|
|
Task<long> GetLogExportImagesSizeAsync(CancellationToken ct = default);
|
|
Task<ILogExport> PrepareLogExportAsync(bool includeImages, CancellationToken ct = default);
|
|
} |