https://kotlinlang.org logo
u

ursus

02/20/2021, 5:06 AM
Is there a way to "fix" endpoint that takes bitmaps as base64 strings in json? Could I possibly somehow just stream the whole json, or will I need to implement multipart form data?
f

FunkyMuse

02/23/2021, 2:54 PM
Multipart is the way to go. You can send byte array to your backend and reconstruct the file really easy, that way you'll have tackled SAF too. Base64 will make the request even bigger than what the image is, also don't forget to pay attention if you need to compress the image before sending it to the backend.
👍 1
u

ursus

02/24/2021, 5:02 AM
Right but that requires changes on the backedend, correct? btw whats SAF?
3 Views