Clarify some constants

This commit is contained in:
2025-05-30 09:03:00 +02:00
parent d5fbc24c96
commit dd7f9176fa
5 changed files with 10 additions and 11 deletions

View File

@ -24,7 +24,7 @@ pub async fn upload(MultipartForm(mut form): MultipartForm<UploadDiskImageForm>)
let file = form.files.remove(0);
// Check uploaded file size
if file.size > constants::DISK_IMAGE_MAX_SIZE {
if file.size > constants::DISK_IMAGE_MAX_SIZE.as_bytes() {
return Ok(HttpResponse::BadRequest().json("Disk image max size exceeded!"));
}