Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

I want to display the uploaded image to the firestore in html img tag

$
0
0

I want to display the image which I have uploaded to the firebase firestore, and even I want to display the images according to the user id who have logged in and to display the image from their respective user-id folder. below is the code.

var storage    = firebase.storage();
var storageRef = storage.ref();
var spaceRef = storageRef.child('ProfilePictures/" + auth.getUid() + "/theUploadedImageName');

storageRef.child('ProfilePictures/"' + auth.getUid() + '"/theUploadedImageName').getDownloadURL().then(function(url) {


 var test = url;
 document.getElementById("profile-img-tag").src = test;

}).catch(function(error) {

});

theUploadedImageName must take the value or the URL of the image which is uploaded and display it in the HTML image tag!


Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>