Reputation: 1407
I would like to be able to add security rules on Firebase Storage to control and prevent image import from the application. For that I would like to be able to send an image or audio file to a Cloud Functions, so that it takes care of the uploads itself, and not from the Front part.
My question is therefore the following: Knowing that we can already store an image directly from a Flutter application, is it possible to do the same thing but from a Cloud Functions?
Upvotes: 0
Views: 367
Reputation: 598847
Within server-side environments such as Cloud Functions, you can use the Firebase Admin SDK to interact with Cloud Storage. In this case you'll end up using a pre-initialized version of the Node.js SDK for Cloud Storage.
With that knowledge we can search for Node.js SDK for Cloud Storage upload file, which leads to:
Upvotes: 2