How can I send files with Ktor client and FormData...
# ktor
n
How can I send files with Ktor client and FormData in KotlinJS? I receive files as
FileList
(which contains the actual Files) from React Input of type
file
. But I haven't found a way to append them to FormData. I tried using the
org.w3c.xhr.FormData
but I get the error
Copy code
IllegalStateException: Fail to serialize body. Content has type: class null, but OutgoingContent expected.
But when I try to use the Ktors
io.ktor.client.request.forms
FormData, there is no override for
append
that accepts File type
n
Thank you!