feat: 增加附件文件大小限制至 200MB
This commit is contained in:
parent
63714b6c6e
commit
4742a6aed9
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user