Hello has anyone tried to upload file/image for IO...
# compose-ios
m
Hello has anyone tried to upload file/image for IOS? How to save the image in disk before calling API? Currently I am using a ktor client to upload an image via multipart.
c
Can you give more context…
m
hi @Cherrio LLC thanks for replying. I am trying to use a ktor client to upload an image via multipart. Currently I tried to follow this from the channel: https://kotlinlang.slack.com/archives/C3PQML5NU/p1591158232264800?thread_ts=1591156286.264700&cid=C3PQML5NU But I am a bit stuck on saving the file/image in the IOS platform. Do you have any idea how to do it?
c
You don’t have to save the file on disk.
Just get the image data as
NSData
then convert it to
bytearray
then send upload it using Ktor