0

I am trying to Save Image taken from expo camera in my local folder.I am getting Uri,Base64 in return and base64 string is sometime to large.

What would be the best way to store image in my Desktop and keep record of it in database

Following is my code :

 const options = {
          quality: 0.5,
          base64: true,
          skipProcessing: true,
        };

        let img = await ref.current.takePictureAsync(options);
        setbase64(img.base64);

1 Answers1

0

and keep record of it in database

You can store a base64 string in your database like any other string, but base64 strings can be 37% larger than binary, and image files are big as is, so that might be tough. I've tried storing it in Firebase Firestore for example and they'd give a size limit error.

I had to switch to cloudinary and use their upload api for base64 strings in order to store my pictures.

Christian
  • 356
  • 1
  • 5
  • 14