mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-13 19:08:05 +00:00
Improve code readability
This commit is contained in:
@ -159,8 +159,8 @@ impl FromRequest for CustomRequest {
|
|||||||
let mut field = el?;
|
let mut field = el?;
|
||||||
|
|
||||||
let content_type = field.content_disposition().clone();
|
let content_type = field.content_disposition().clone();
|
||||||
let name = content_type.get_name().ok_or(
|
let name = content_type.get_name().
|
||||||
ErrorInternalServerError("Missing field name!"))?;
|
ok_or_else(|| ErrorInternalServerError("Missing field name!"))?;
|
||||||
|
|
||||||
// Handle file upload
|
// Handle file upload
|
||||||
if content_type.get_filename().is_some() {
|
if content_type.get_filename().is_some() {
|
||||||
|
Reference in New Issue
Block a user