on-internet
← Community

How to upload an image to a server using http request in kotlin?

Stack Overflow ·

I have written code to upload images to the server using kotlin, that is, the user takes a picture through the camera then displays the image in the imageView when the user clicks the send button, I want the image from ImageView to be sent to the server, but I don't know how to change the image from ImageView be a file that can be sent to the server. I have designed code to capture image and set the image in image view to preview it but not getting idea to upload it to the server using http request. for opening camera and setting image into imageview: private fun openCamera(){ val values = Con

Comments

Sign in or sign up to comment and upvote.

No comments yet.