Sai Krishna
Sai Krishna

Reputation: 25

converting Base64 string to image using cloud functions and store in cloud storage

Using front end of my application I'm storing Base64 string to cloud storage. When I store the string, it should invoke cloud function and convert the Base 64 string to image and the cloud function should save the image into cloud storage.

I was stuck getting string from storage and converting to image.

Upvotes: 1

Views: 1645

Answers (1)

Brian Kung
Brian Kung

Reputation: 4267

I ran into a similar issue with React Native / Expo and found a solution here:

https://medium.com/@wcandillon/uploading-images-to-firebase-with-expo-a913c9f8e98d

The code snippet above uploads a picture to a Firebase Cloud Function that will finally store the cloud function into Firebase Storage. Below is how the Cloud Function looks like. Many thanks to Eric Lee for showing me how to store images from a cloud function.

Upvotes: 1

Related Questions