elysiajs / eden

Fully type-safe Elysia client
MIT License
173 stars 41 forks source link

Bodies with files turns gets turned into string on server #123

Open hazelnutcloud opened 3 months ago

hazelnutcloud commented 3 months ago

The issue can be specifically traced down to this line: https://github.com/elysiajs/eden/blob/8a0f7b6194ea336b18a1c80d9a7dd6d2b1afbba2/src/treaty2/index.ts#L292

When passing in a value that is of type File[], calling .append() on it converts it into [object Blob] instead of the desired effect of appending the contents of the array.

This can be fixed by checking Array.isArray on the field.