2016-06-10 41 views

risposta

7

È possibile utilizzare getDownloadURL che restituisce un Promise, che a sua volta può essere utilizzato per catturare un errore "non trovato", o elaborare il file se esiste. Ad esempio:

storageRef.child("file.png").getDownloadURL().then(onResolve, onReject); 

function onResolve(foundURL) { 
    //stuff 
} 

function onReject(error) { 
    console.log(error.code); 
} 
Problemi correlati