fix(upload): prevent sending empty file name

This commit is contained in:
orhun 2021-07-28 00:21:34 +03:00
parent 315585db36
commit f4a3c07def
No known key found for this signature in database
GPG key ID: F83424824B3E4B90

View file

@ -42,6 +42,7 @@ impl ContentDisposition {
.find(|param| param.is_filename())
.map(|param| param.as_filename())
.flatten()
.filter(|file_name| !file_name.is_empty())
.ok_or_else(|| error::ErrorBadRequest("file data not present"))
}
}