From fb77d72913a2d0127600c2f06448aca831bdee16 Mon Sep 17 00:00:00 2001 From: Spxg Date: Sun, 18 May 2025 16:16:14 +0800 Subject: [PATCH] Fix download, Array instead Array --- src/app/header.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/header.rs b/src/app/header.rs index ef26de1..206f36a 100644 --- a/src/app/header.rs +++ b/src/app/header.rs @@ -122,7 +122,10 @@ fn DownloadButton() -> impl IntoView { }; let filename = downloaded.filename; let buffer = downloaded.data; - let blob = Blob::new_with_u8_array_sequence(&js_sys::Array::from(&buffer)).unwrap(); + let array = js_sys::Array::new(); + array.push(&buffer); + + let blob = Blob::new_with_u8_array_sequence(&array).unwrap(); let url = Url::create_object_url_with_blob(&blob).unwrap(); let document = document();