0

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?

Mark Rotteveel
  • 90,369
  • 161
  • 124
  • 175
Lab
  • 947
  • 2
  • 10
  • 24

1 Answers1

2

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:

Renaud Tarnec
  • 66,768
  • 8
  • 72
  • 104
Frank van Puffelen
  • 499,950
  • 69
  • 739
  • 734