Invia i log a parti e chiedi se includere le foto

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>
This commit is contained in:
MarcoEandClaude Opus 5.5 committed 2026-09-28 12:10:19 +02:00
1 parent a4e5709be6
commit 9799f6b0c7
9 files changed
+403 -183

No files matched your search

+12 -9
View File
@@ -6,28 +6,31 @@ public class SendEmailDto
{
[JsonPropertyName("from")]
public string? From { get; set; }
[JsonPropertyName("fromName")]
public string? FromName { get; set; }
[JsonPropertyName("to")]
public string? To { get; set; }
[JsonPropertyName("subject")]
public string? Subject { get; set; }
[JsonPropertyName("msgText")]
public string? MsgText { get; set; }
[JsonPropertyName("html")]
public bool IsHtml { get; set; }
[JsonPropertyName("attachments")]
// Gli allegati viaggiano come parti multipart "allegati", non dentro il JSON della richiesta.
[JsonIgnore]
public List<AttachmentsDto>? Attachments { get; set; }
public class AttachmentsDto
{
public string FileName { get; set; } = string.Empty;
public byte[] FileContent { get; set; } = [];
// Il file resta su disco e viene letto in streaming durante l'upload.
public string FilePath { get; set; } = string.Empty;
}
}
}