Send and process files by running Gemini in firebase

I am developing an app via cursor in Expo React Native environment. In the app, the user simply selects 1 or more than 1 file (These are the files in the firebase storage that the user uploaded) and proceeds, then gemini summarises the content of these files. That’s exactly what I’m trying to do, but I can’t get it right.

I was undecided about doing this on the client side. I thought about running a function in Firebase and having this function do exactly this and return the summary back to the app, but as I said, I failed. How do you think I should do it? Is this possible with Firebase Functions? Or is there a more accurate approach than the approach I mentioned? (My code knowledge is quite low)

I’d appreciate your help!

Hey @vexenuch ,

Welcome to Forum!

yes, using Firebase Functions is a good approach! You can write a cloud function that fetches the file from Firebase Storage, sends it to Gemini for summarization, and returns the result to your app. It keeps things secure and offloads the heavy lifting from the client. Let me know if you’d like help setting up a basic version!

Thanks!

Hello,

For support on Firebase related issues you can raise your issue on firebase support.