Hi guys, I have a kotlin multiplatform project that is used as a module in iOS app and Android app to act as Data Repository. I am trying to implement a method to upload files in this KMP Module that can be accessed from iOS app code and Android App Code. Is there any documented way or some blog posts that help this scenario?
r
ritesh
06/03/2020, 4:23 AM
Hey! I did it recently in the form of user avatar upload using multipart request.
The process that I’m following,
• save the file on disk on both the platform, get a file url and send it to KMP
• KMP will then convert it into ByteArray and then upload it using Ktor
Let me know if this works for you or would you like to know something specific.
👍 1
j
Jolas
06/03/2020, 4:27 AM
Thanks Ritesh. I was looking for some sample code. Anyhow, I’ll try your process and let you know, Ritesh.