server: handle application/* as an attachment

This commit is contained in:
2025-08-18 12:11:31 -07:00
parent 834e873862
commit 574de65c35
3 changed files with 45 additions and 8 deletions

View File

@@ -119,9 +119,10 @@ async fn download_attachment(
} else {
format!("id:{}", id)
};
info!("download attachment {mid} {idx}");
info!("download attachment message id '{mid}' idx '{idx}'");
let idx: Vec<_> = idx
.split('.')
.filter(|s| !s.is_empty())
.map(|s| s.parse().expect("not a usize"))
.collect();
let attachment = attachment_bytes(&nm, &mid, &idx)?;