uploadProfileImage

Upload profile image

This function uses for profile image upload for customer with id from the parameters.

suspend fun uploadProfileImage(token: String, customerId: String, file: File): ResponseHolder<Any?> {
    val requestFile = file
        .asRequestBody("image/png".toMediaTypeOrNull())
    val body = MultipartBody.Part.createFormData("file", "somename", requestFile)
    val description = "image/png".toRequestBody("multipart/form-data".toMediaTypeOrNull())
    return CustomerRequests(baseUrl, activity).uploadProfileImage(
        token,
        schemeId,
        customerId,
        description,
        body,
    )
}