From 9db0fa25138490671dce8e9fd39c168b4eca03aa Mon Sep 17 00:00:00 2001 From: jude Date: Thu, 19 Oct 2023 20:10:40 +0100 Subject: [PATCH] Fix attachment decoding --- web/Cargo.toml | 2 +- web/src/routes/dashboard/mod.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/web/Cargo.toml b/web/Cargo.toml index c963e62..3eb2db0 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "reminder_web" -version = "0.1.1" +version = "0.1.2" authors = ["jellywx "] edition = "2018" diff --git a/web/src/routes/dashboard/mod.rs b/web/src/routes/dashboard/mod.rs index 80e3e7a..47ca224 100644 --- a/web/src/routes/dashboard/mod.rs +++ b/web/src/routes/dashboard/mod.rs @@ -468,8 +468,6 @@ pub(crate) async fn create_reminder( } } - // base64 decode error dropped here - let attachment_data = reminder.attachment.as_ref().map(|s| base64::decode(s).ok()).flatten(); let name = if reminder.name.is_empty() { name_default() } else { reminder.name.clone() }; let username = if reminder.username.as_ref().map(|s| s.is_empty()).unwrap_or(true) { None @@ -510,7 +508,7 @@ pub(crate) async fn create_reminder( `utc_time` ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", new_uid, - attachment_data, + reminder.attachment, reminder.attachment_name, channel, reminder.avatar,