elysiajs / eden

Fully type-safe Elysia client
MIT License
147 stars 37 forks source link

fix(treaty2): file getting sent as json #73

Closed tomatenbaumful closed 4 months ago

tomatenbaumful commented 5 months ago

Trying to send an File will result in the Request getting sent as JSON, because the code handling files is unreachable since the object condition is also true. Also the content-type header needs to be removed so the fetch API can set the form-data type with correct boundaries otherwise there is an issue on the Server.

Mautriz commented 5 months ago

I was just submitting a PR for the exact same thing, thanks man, I hope it gets merged soon :~D