feat: 增加附件文件大小限制至 200MB

This commit is contained in:
oudecheng 2026-06-26 12:03:33 +08:00
parent 63714b6c6e
commit 4742a6aed9

View File

@ -456,7 +456,7 @@ fn parse_attachments(value: &serde_json::Value) -> anyhow::Result<Vec<MediaItem>
return Err(anyhow!("attachment file is empty: {}", raw_path));
}
let content_base64 = (metadata.len() <= 50 * 1024 * 1024)
let content_base64 = (metadata.len() <= 200 * 1024 * 1024)
.then(|| {
let mut file = std::fs::File::open(&resolved_path)?;
let mut buf = Vec::with_capacity(metadata.len() as usize);