Uploading png error with MultipartBody.Part and RequestBody in Kotlin
I am currently making a project for attendance application in Kotlin and I am trying to send a selfie image to the back-end for proof of attendance. I used MultipartBody.Part to send the image file and RequestBody to send the other stuff.
@Multipart
@POST("shiftentry/clockin")
suspend fun clockin(
@Header("Authorization") auth: String,
@Part("shift_entry_id") id: RequestBody,
@Part("location") location:RequestBody,
@Part file: MultipartBody.Part
):...