Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,8 @@ pub fn upload_blob_prechecks(
// Only check validity if the header is present.
// This is safe, because in the PUT /upload implementation the actual blob size is checked.
if let Some(content_length) = content_length {
if let Ok(content_length) = content_length.parse::<f64>() {
let blob_size_in_mb = bytes_to_mb(content_length);
if let Ok(content_length) = content_length.parse::<u64>() {
let blob_size_in_mb = bytes_to_mb(content_length as f64);
let max_size = app_state.config.upload.max_size;
if blob_size_in_mb.ceil() > max_size {
return Err((
Expand Down