fix: only allow 4 uploads at once

This commit is contained in:
trisua 2025-05-11 14:43:09 -04:00
parent 70965298b5
commit 6fabb38c10
2 changed files with 7 additions and 0 deletions

View file

@ -41,6 +41,12 @@ pub async fn create_request(
}
}
if images.len() > 4 {
return Json(
Error::MiscError("Too many uploads. Please use a maximum of 4".to_string()).into(),
);
}
let mut props = Post::new(
req.content,
match req.community.parse::<usize>() {