add: ability to manage uploads
This commit is contained in:
parent
6fabb38c10
commit
eb95be0f38
11 changed files with 234 additions and 48 deletions
|
@ -81,7 +81,7 @@ pub async fn get_request(
|
|||
}
|
||||
|
||||
// maximum file dimensions: 512x512px (256KiB)
|
||||
pub const MAXIUMUM_FILE_SIZE: usize = 262144;
|
||||
pub const MAXIMUM_FILE_SIZE: usize = 262144;
|
||||
|
||||
pub async fn create_request(
|
||||
jar: CookieJar,
|
||||
|
@ -96,7 +96,7 @@ pub async fn create_request(
|
|||
};
|
||||
|
||||
// check file size
|
||||
if img.0.len() > MAXIUMUM_FILE_SIZE {
|
||||
if img.0.len() > MAXIMUM_FILE_SIZE {
|
||||
return Json(Error::DataTooLong("image".to_string()).into());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue