diff --git a/src/pages/api/students.rs b/src/pages/api/students.rs index 60c029b..1a5e57c 100644 --- a/src/pages/api/students.rs +++ b/src/pages/api/students.rs @@ -346,8 +346,9 @@ pub async fn get_student_files( debug_log!("Writing {} files to zip file...", results.len()); for (key, file_bytes) in results { + let file_name = key.split('/').last().unwrap_or_default(); writer - .start_file(key.clone(), SimpleFileOptions::default()) + .start_file(file_name, SimpleFileOptions::default()) .map_err(ServerFnError::new)?; writer.write_all(&file_bytes).map_err(ServerFnError::new)?; } diff --git a/src/pages/provider_applicants.rs b/src/pages/provider_applicants.rs index 43c5c78..cf3f158 100644 --- a/src/pages/provider_applicants.rs +++ b/src/pages/provider_applicants.rs @@ -678,7 +678,7 @@ fn StudentInformationDialog( .dyn_into() .unwrap(); - a.set_download("testing.zip"); + a.set_download(""); a.set_href(&data_url); document().body().unwrap().append_child(&a).unwrap(); a.click();