make files optional when deserializing form data

This commit is contained in:
Evan Almloff 2023-04-26 18:05:13 -05:00
parent 06ae3756ad
commit cfe94950c6

View file

@ -14,7 +14,11 @@ pub struct FormData {
#[cfg_attr( #[cfg_attr(
feature = "serialize", feature = "serialize",
serde(skip_serializing, deserialize_with = "deserialize_file_engine") serde(
default,
skip_serializing,
deserialize_with = "deserialize_file_engine"
)
)] )]
pub files: Option<std::sync::Arc<dyn FileEngine>>, pub files: Option<std::sync::Arc<dyn FileEngine>>,
} }