Complete the code to get a download URL from Firebase Storage.
const storageRef = firebase.storage().ref('files/example.txt'); storageRef.[1]().then(url => { console.log(url); });
The getDownloadURL() method retrieves the download URL for a file in Firebase Storage.
Complete the code to create a reference to a file named 'image.png' in Firebase Storage.
const storage = firebase.storage(); const imageRef = storage.ref().[1]('images/image.png');
The child() method creates a reference to a file or folder inside a Firebase Storage reference.
Fix the error in the code to correctly get the download URL for 'docs/manual.pdf'.
const ref = firebase.storage().ref('docs/manual.pdf'); ref.[1]().then(url => { console.log(url); });
The correct method to get a download URL is getDownloadURL(). Other options are invalid.
Fill both blanks to create a reference and get the download URL for 'videos/clip.mp4'.
const storage = firebase.storage(); const videoRef = storage.[1]().[2]('videos/clip.mp4');
First, use ref() to get the root reference, then child() to point to the file path.
Fill all three blanks to get the download URL for 'music/song.mp3' and log it.
const storage = firebase.storage(); const songRef = storage.[1]().[2]('music/song.mp3'); songRef.[3]().then(url => console.log(url));
Use ref() to get root, child() for file path, and getDownloadURL() to get the URL.