Hi guys, I have a kotlin multiplatform project tha...
# multiplatform
j
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
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
Thanks Ritesh. I was looking for some sample code. Anyhow, I’ll try your process and let you know, Ritesh.
r
https://github.com/ktorio/ktor/issues/1149 ^^ this was a useful/starter thread for me if you want to see some code
👍 1
j
Cool. Thanks Ritesh. I've tried your suggestion. Its working.
r
Glad it worked 😄
h
hi if let say I got bitmap/byteArray when upload into server i got error 500 request too long. how to solve this issue?