diff --git a/src/main.rs b/src/main.rs index 2539635..61533a0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,9 @@ use tokio::{fs::File, sync::RwLock}; const APP_NAME: &str = "transbeam"; +const DATE_DISPLAY_FORMAT: &[time::format_description::FormatItem] = + time::macros::format_description!("[year]-[month]-[day]"); + struct AppState { file_store: RwLock, config: Config, diff --git a/templates/download.html b/templates/download.html index 8675972..4d1c6a6 100644 --- a/templates/download.html +++ b/templates/download.html @@ -15,6 +15,7 @@
{{ info.file.name }}
{{ bytesize::to_string(info.file.size.clone(), false).replace(" ", "") }}
+
Expires {{ info.file.expiry.format(DATE_DISPLAY_FORMAT).unwrap() }}
{% match info.file.contents %} {% when Some with (files) %}