Send image from Flutter to callable cloud function
234
You have to upload the image from the client side. There is no way to send image data from client to Could Function
without uploading. You can do following things:
- Upload the image from the client side and save the download url to
Cloud Firestore
. - Use a
Cloud Function Trigger
to executeonDoumentCreated()
and get the newly uploaded image url. Here you can do many things like cropping or compressing, generating thumbnails as you want. - Complete the registration from
Cloud Function
.
Author by
Patrick
Updated on December 23, 2022Comments
-
Patrick over 1 year
I have callable cloud function used to register new Users. These users should also have a profile pic. I want to handle the whole registration process in my function and not from my client, so I want to send the image picked by the user to the function and upload it from there.
How do I send the image in the json data argument?