diff options
Diffstat (limited to 'kittybox-rs/src/media/storage/mod.rs')
-rw-r--r-- | kittybox-rs/src/media/storage/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kittybox-rs/src/media/storage/mod.rs b/kittybox-rs/src/media/storage/mod.rs index b34da88..4ef7c7a 100644 --- a/kittybox-rs/src/media/storage/mod.rs +++ b/kittybox-rs/src/media/storage/mod.rs @@ -17,6 +17,8 @@ pub struct Metadata { pub filename: Option<String>, /// The recorded length of the file. pub length: Option<NonZeroUsize>, + /// The e-tag of a file. Note: it must be a strong e-tag, for example, a hash. + pub etag: Option<String>, } impl From<&Field<'_>> for Metadata { fn from(field: &Field<'_>) -> Self { @@ -25,7 +27,8 @@ impl From<&Field<'_>> for Metadata { .map(|i| i.to_owned()), filename: field.file_name() .map(|i| i.to_owned()), - length: None + length: None, + etag: None, } } } |