How to save Profile image of Google or Facebook button in firebase storage

0

my question is: through FirebaseAuth I get the user's data and that data is passed to Firebase Database including the URL of the profile image == > mAuth.getCurrentUser (). getPhotoUrl ();

a Firebase database is passed through mAuth.getCurrentUser (). getPhotoUrl (). toString (); from which I get the URL of the image

What I want is to grab that profile image URL and save it in Firebase Storage

and from my storage acquire the new URL of the image and show the user the image

In other words I want to get the image and save it in my storage

Thanks for your answers

    
asked by Jonathan 10.11.2017 в 07:09
source

1 answer

0

For your case my recommendation would be to use Firebase Functions that allow you to have Node.js functions hosted on it Firebase serverless infrastructure. Functions are designed to react to Firebase service events, such as "a new record was created in the database" or "a new user was registered". that way you can capture the URLs of the photos and within the same function download the image to save it in storage.

    
answered by 24.11.2017 в 23:32