Skip to content

Commit 9bba362

Browse files
authored
Merge pull request #124 from hazelnutcloud/main
Fix file upload bug on server
2 parents 3c2548e + 89da73b commit 9bba362

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/treaty2/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,10 @@ const createProxy = (
337337
}
338338

339339
if (isServer) {
340-
formData.append(key, field as any)
340+
if (Array.isArray(field))
341+
for (const f of field)
342+
formData.append(key, f)
343+
else formData.append(key, field as any)
341344

342345
continue
343346
}

0 commit comments

Comments
 (0)