Update to latest beta
This commit is contained in:
parent
4dd4b8db41
commit
493d99f0ed
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "actix-form-data"
|
||||
description = "Multipart Form Data for Actix Web"
|
||||
version = "0.6.0-beta.10"
|
||||
version = "0.6.0-beta.11"
|
||||
license = "GPL-3.0"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
repository = "https://git.asonix.dog/Aardwolf/actix-form-data.git"
|
||||
|
@ -10,9 +10,9 @@ keywords = ["actix", "form-data", "multipart", "async"]
|
|||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
actix-multipart = "0.4.0-beta.7"
|
||||
actix-rt = "2.3.0"
|
||||
actix-web = { version = "4.0.0-beta.10", default-features = false }
|
||||
actix-multipart = "0.4.0-beta.8"
|
||||
actix-rt = "2.5.0"
|
||||
actix-web = { version = "4.0.0-beta.11", default-features = false }
|
||||
futures-util = "0.3.17"
|
||||
mime = "0.3.16"
|
||||
thiserror = "1.0"
|
||||
|
|
|
@ -614,15 +614,6 @@ pub(crate) struct ContentDisposition {
|
|||
pub filename: Option<String>,
|
||||
}
|
||||
|
||||
impl ContentDisposition {
|
||||
pub(crate) fn empty() -> Self {
|
||||
ContentDisposition {
|
||||
name: None,
|
||||
filename: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub(crate) enum NamePart {
|
||||
Map(String),
|
||||
|
|
|
@ -90,12 +90,11 @@ fn parse_multipart_name(name: String) -> Result<Vec<NamePart>, Error> {
|
|||
}
|
||||
|
||||
fn parse_content_disposition(field: &actix_multipart::Field) -> ContentDisposition {
|
||||
match field.content_disposition() {
|
||||
Some(x) => ContentDisposition {
|
||||
name: x.get_name().map(|v| v.to_string()),
|
||||
filename: x.get_filename().map(|v| v.to_string()),
|
||||
},
|
||||
None => ContentDisposition::empty(),
|
||||
let content_disposition = field.content_disposition();
|
||||
|
||||
ContentDisposition {
|
||||
name: content_disposition.get_name().map(|v| v.to_string()),
|
||||
filename: content_disposition.get_filename().map(|v| v.to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue