Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
174
rated 0 times [  175] [ 1]  / answers: 1 / hits: 28240  / 8 Years ago, thu, december 22, 2016, 12:00:00

This is my Firebase Database:



firebase



I need the URLs of the images that are associated alongside the unique random name generated by the push method. Is there any way I could do that? Also, there must exist a better way of sending data. Please, let me know. Thanks.



imgRef.on('value', function(snapshot) {
console.log(snapshot.val());
});


This is, as expected, returning the entire JSON object. I need the URL.


More From » firebase

 Answers
11

This is the most basic way to show the list of image URLs:



var rootRef = firebase.database.ref();
var urlRef = rootRef.child(user1/DAA Notes/URL);
urlRef.once(value, function(snapshot) {
snapshot.forEach(function(child) {
console.log(child.key+: +child.val());
});
});

[#59599] Wednesday, December 21, 2016, 8 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
vaughns

Total Points: 20
Total Questions: 112
Total Answers: 112

Location: Falkland Islands
Member since Mon, Jul 13, 2020
4 Years ago
;