From bc23c5b9fef441d4460f320affd7d65b7dd5d44a Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Wed, 13 Mar 2024 17:10:41 -0400 Subject: [PATCH] LibWeb: Append the bytes of File objects in submitted form data This is required to upload files to GitHub. Unfortunately, this is not currently testable with our test infrastructure. This path is only hit from HTTP/S uploads, whereas all of our tests are limited to file://. --- Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp b/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp index 6b95d1cffb..54c539f09f 100644 --- a/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp +++ b/Userland/Libraries/LibWeb/HTML/FormControlInfrastructure.cpp @@ -270,7 +270,7 @@ ErrorOr serialize_to_multipart_form_data(Vectortype())))); - // FIXME: Serialize the contents of the file. + TRY(builder.try_append(file->bytes())); TRY(builder.try_append("\r\n"sv)); return {}; },