From fedade8617190bab7eaca7c61d0198ee10700b93 Mon Sep 17 00:00:00 2001 From: kdeng00 Date: Sat, 28 Jun 2025 19:01:41 -0400 Subject: [PATCH] Bug fix that was causing errors --- src/callers/song.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/callers/song.rs b/src/callers/song.rs index 046c197..3f17a80 100644 --- a/src/callers/song.rs +++ b/src/callers/song.rs @@ -730,7 +730,13 @@ pub mod endpoint { if let Some(field) = multipart.next_field().await.unwrap() { let name = field.name().unwrap().to_string(); let file_name = field.file_name().unwrap().to_string(); - let content_type = field.content_type().unwrap().to_string(); + let content_type = match field.content_type() { + Some(ct) => { + ct.to_string() + } + None => String::new() + }; + // .unwrap().to_string(); let data = field.bytes().await.unwrap(); println!(