Multipart form UI and fixes

This commit is contained in:
Gregory Schier
2023-11-14 00:32:02 -08:00
parent a4f5e4a6b8
commit f60cb35b5e
7 changed files with 113 additions and 45 deletions

View File

@@ -160,7 +160,7 @@ pub async fn actually_send_request(
multipart_form = multipart_form.part(
render::render(name, &workspace, environment_ref),
match !file.is_empty() {
true => multipart::Part::bytes(fs::read(file).expect("Failed to read file")),
true => multipart::Part::bytes(fs::read(file).map_err(|e| e.to_string())?),
false => multipart::Part::text(render::render(value, &workspace, environment_ref)),
},
);