mirror of
https://github.com/amigan/rustypaste-pretty.git
synced 2024-11-21 11:59:48 -05:00
fix(upload): prevent sending empty file name
This commit is contained in:
parent
315585db36
commit
f4a3c07def
1 changed files with 1 additions and 0 deletions
|
@ -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"))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue