Hi Team Facing one issue in Android ktor client. W...
# ktor
r
Hi Team Facing one issue in Android ktor client. When sending multipart data with image then it throws error Multipart class not a serialised class. How to implement a ktor inbuild class with serialised annotation. Thanks in advance
p
Can you post some sample code of what you're trying to do?
Did you look at this example: https://ktor.io/docs/request.html#upload_file
a
Probably, the problem is that you send a request with the
Content-Type: application/json
header so the
ContentNegotiation
plugin tries to serialize a
MultiPartFormDataContent
object. If this is the case, just remove the
Content-Type
header from a request if it’s configured via
DefaultRequest
plugin.