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

@ -451,6 +451,7 @@
</li> </li>
<li>Ability to upload and use gif emojis</li> <li>Ability to upload and use gif emojis</li>
<li>Create infinite stack timelines</li> <li>Create infinite stack timelines</li>
<li>Ability to upload images to posts</li>
</ul> </ul>
<a <a

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( let mut props = Post::new(
req.content, req.content,
match req.community.parse::<usize>() { match req.community.parse::<usize>() {