fix: only allow 4 uploads at once
This commit is contained in:
parent
70965298b5
commit
6fabb38c10
2 changed files with 7 additions and 0 deletions
|
@ -451,6 +451,7 @@
|
|||
</li>
|
||||
<li>Ability to upload and use gif emojis</li>
|
||||
<li>Create infinite stack timelines</li>
|
||||
<li>Ability to upload images to posts</li>
|
||||
</ul>
|
||||
|
||||
<a
|
||||
|
|
|
@ -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>() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue