react-native-jsi-image icon indicating copy to clipboard operation
react-native-jsi-image copied to clipboard

How to upload image to server?

Open NitinChronext opened this issue 2 years ago • 4 comments

I Liked the lib but there is no clear documentation about how we can upload images (UIImage ) to the server. It only shows how we can download it

Thanks, Nitin

NitinChronext avatar May 04 '22 18:05 NitinChronext

Hey - this could be implemented in a third party API since there's so much stuff to an image upload function (API params, authentication, HTTP headers, buffering, etc etc)

mrousavy avatar May 05 '22 07:05 mrousavy

No I am saying How can we send UIImage object to https since your point was not to convert image into base64

NitinChronext avatar May 05 '22 08:05 NitinChronext

Yes, we are talking about the same thing. In this case you will have to upload a binary stream, or base64. But there currently is no API for this, this needs to be implemented.

mrousavy avatar May 05 '22 08:05 mrousavy

I think it would be out of scope of this library to handle upload. We need to give Turbo modules and Fabric some time to mature. Ideally, I'd see a flavour of Expo uploadAsync made to handle JSI image, but Expo still haven't implemented Fabric or Turbo modules.

lukebrandonfarrell avatar May 09 '22 14:05 lukebrandonfarrell