Skip to content

Lightpanda: the headless browser designed for AI and automation

webapi:

Karl Seguin3eca66ef78f4
diff --git a/src/browser/webapi/net/FormData.zig b/src/browser/webapi/net/FormData.zig
index 602982fb9..42f9e0b9a 100644
--- a/src/browser/webapi/net/FormData.zig
+++ b/src/browser/webapi/net/FormData.zig
@@ -246,6 +246,9 @@ pub fn set(self: *FormData, name: String, value: EntryValue, filename: ?[]const
// https://xhr.spec.whatwg.org/#create-an-entry
pub fn append(self: *FormData, name: []const u8, value: EntryValue, filename: ?[]const u8, exec: *Execution) !void {
+ if (filename != null and value == .bytes) {
+ return error.TypeError;
+ }
const entry_value: Entry.Value = switch (value) {
.blob => |blob| blk: {
if (filename) |n| {