mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-01 01:16:59 +02:00
fix(multipart): optional content-disposition for non-form-data requests (#3416)
This commit is contained in:
@@ -41,8 +41,9 @@ impl<'t> FieldReader<'t> for Bytes {
|
||||
content_type: field.content_type().map(ToOwned::to_owned),
|
||||
file_name: field
|
||||
.content_disposition()
|
||||
.expect("multipart form fields should have a content-disposition header")
|
||||
.get_filename()
|
||||
.map(str::to_owned),
|
||||
.map(ToOwned::to_owned),
|
||||
})
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user