Background:
Specifications:
firebase.functions().httpsCallablefunctions.https.onCallQuestion:
How can firebase.functions().httpsCallable submit files to functions.https.onCall?
Thank you in advance.
ABC.
That's not really an intended use case for callable functions. Callables are meant to send a JSON payload to the server, not a file. If you really want to send a (small) file to a function, you'll need to base64 encode it as a string, and put that string in the JSON payload, then decode it in the function.
Instead, consider allowing the client to upload directly to storage, then use a function to validate it with a storage trigger, and delete it if it's not valid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With