Hello, I have been struggling with having the abil...
# javascript
r
Hello, I have been struggling with having the ability to upload a file using Kotlin/JS. Currently using Ktor and my code looks like this: _httpClient_.post("$_BackendServerURL_/") { _contentType_(ContentType.MultiPart.Any) setBody(MultiPartFormDataContent( formData*{* // append("uploadDocument", inputAsset.uploadDocument) append( key ="String", value = Json._encodeToString_(String), Headers.build*{* append(HttpHeaders.ContentType,"multipart/form-data") append(HttpHeaders.ContentDisposition,File(Object.uploadDocument).) }) }, )) }
k
i think that’s more for the #ktor channel also when you say you have been struggle it would be better to tell about the problem directly.
👍 1