add: ability to enable pages instead of infinite scrolling
This commit is contained in:
parent
fa72d6a59d
commit
ffdf320c14
15 changed files with 47 additions and 15 deletions
|
@ -213,7 +213,7 @@ pub async fn upload_avatar_request(
|
|||
if mime == "image/gif" {
|
||||
// gif image, don't encode
|
||||
if img.0.len() > MAXIMUM_GIF_FILE_SIZE {
|
||||
return Json(Error::DataTooLong("gif".to_string()).into());
|
||||
return Json(Error::FileTooLarge.into());
|
||||
}
|
||||
|
||||
std::fs::write(&path, img.0).unwrap();
|
||||
|
@ -226,7 +226,7 @@ pub async fn upload_avatar_request(
|
|||
|
||||
// check file size
|
||||
if img.0.len() > MAXIMUM_FILE_SIZE {
|
||||
return Json(Error::DataTooLong("image".to_string()).into());
|
||||
return Json(Error::FileTooLarge.into());
|
||||
}
|
||||
|
||||
// upload image
|
||||
|
@ -314,7 +314,7 @@ pub async fn upload_banner_request(
|
|||
if mime == "image/gif" {
|
||||
// gif image, don't encode
|
||||
if img.0.len() > MAXIMUM_GIF_FILE_SIZE {
|
||||
return Json(Error::DataTooLong("gif".to_string()).into());
|
||||
return Json(Error::FileTooLarge.into());
|
||||
}
|
||||
|
||||
std::fs::write(&path, img.0).unwrap();
|
||||
|
@ -327,7 +327,7 @@ pub async fn upload_banner_request(
|
|||
|
||||
// check file size
|
||||
if img.0.len() > MAXIMUM_FILE_SIZE {
|
||||
return Json(Error::DataTooLong("image".to_string()).into());
|
||||
return Json(Error::FileTooLarge.into());
|
||||
}
|
||||
|
||||
// upload image
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue