forked from Dev040302/-Flippy-WEb-App
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecive.js
More file actions
34 lines (25 loc) · 627 Bytes
/
recive.js
File metadata and controls
34 lines (25 loc) · 627 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
var storage = firebase.storage();
var storageRef = storage.ref()
$('#List').find('tbody').html('');
var i=0;
storageRef.child('Assignments/').listAll().then(function(result){
result.items.forEach(function(imageRef){
i++;
displayImage(i,imageRef);
});
});
function displayImage(row,images){
images.getDownloadURL().then(function(url){
console.log(url);
let new_html = '';
new_html+='<tr>';
new_html+='<td>';
new_html+=row;
new_html+='</td>';
new_html+='<td>';
new_html+='<img src = "'+url+'" width="100px" >'
new_html+='</td>';
new_html+='</tr>';
$('#List').find('tbody').append(new_html);
});
}