How to convert bitmap to file in kotlin using fragment?
I want to get my image profile data. I have the bitmap, but the required type for image is MultipartBody How can I change bitmap to this type?
Here's my code to load the image. I use fragment:
private val cameraResult =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) { result ->
if (result.resultCode == Activity.RESULT_OK && result.data != null) {
val bitmap = result.data?.extras?.get("data") as Bitmap...