Hello good day everyone! Is there a way to convert...
# moko
m
Hello good day everyone! Is there a way to convert Bitmap to
NSData
using moko-media? Or at least get the file path or name of the Bitmap? as I am currently trying to use the library to get image from gallery/camera and then upload it multipart via Ktor.
m
hello @alex009 thank you so much for replying. 🙇 I ended up using instead:
Copy code
mediaPickerController.pickMedia()
Because I needed the file `path`/`name` to be uploaded via multipart. It is kind of working for the Gallery. But may I ask how should I do this via Camera? as I really need the file `path`/`name` for the upload part.
a
when you do
pickImage
just save
Bitmap
to file with
okio
(read
ByteArray
and write with
okio
)
m
okay @alex009 thank you for this. I will implement it like that. Again, Thank you very much! 🙇