From 570ad5ce243be5303891ab9e3420c3034af251d3 Mon Sep 17 00:00:00 2001
From: G2-Games <ke0bhogsg@gmail.com>
Date: Tue, 25 Feb 2025 11:58:32 -0600
Subject: [PATCH] Flush file on finish

---
 confetti-box/src/lib.rs | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/confetti-box/src/lib.rs b/confetti-box/src/lib.rs
index 338a700..5be8e1a 100644
--- a/confetti-box/src/lib.rs
+++ b/confetti-box/src/lib.rs
@@ -343,6 +343,8 @@ pub async fn websocket_upload(
             .unwrap()
             .insert(&mmid, constructed_file.clone());
 
+        file.flush().await.unwrap();
+
         stream.send(rocket_ws::Message::Text(json::serde_json::ser::to_string(&constructed_file).unwrap())).await?;
 
         Ok(())