0
0
Firebasecloud~10 mins

Storage bucket structure in Firebase - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to define the root storage bucket reference.

Firebase
const bucket = firebase.storage().[1]();
Drag options to blanks, or click blank then click option'
Aref
Bstorage
Cbucket
DgetBucket
Attempts:
3 left
💡 Hint
Common Mistakes
Using bucket() instead of ref()
Using storage() which is the service, not the bucket
Using getBucket() which is not a Firebase Storage method
2fill in blank
medium

Complete the code to create a reference to a folder named 'images' inside the bucket.

Firebase
const imagesRef = bucket.[1]('images/');
Drag options to blanks, or click blank then click option'
Aref
Bfolder
Cchild
Ddirectory
Attempts:
3 left
💡 Hint
Common Mistakes
Using folder() or directory() which do not exist
Using ref() which is for root references
3fill in blank
hard

Fix the error in the code to get a reference to a file named 'photo.jpg' inside 'images' folder.

Firebase
const photoRef = bucket.child('images').[1]('photo.jpg');
Drag options to blanks, or click blank then click option'
Achild
Bref
Cfile
DgetFile
Attempts:
3 left
💡 Hint
Common Mistakes
Using ref() which resets to root
Using file() or getFile() which do not exist
4fill in blank
hard

Fill both blanks to create a reference to 'docs/manual.pdf' inside the bucket.

Firebase
const manualRef = bucket.[1]('docs/').[2]('manual.pdf');
Drag options to blanks, or click blank then click option'
Achild
Bref
Dfile
Attempts:
3 left
💡 Hint
Common Mistakes
Using ref() which resets to root
Using file() which is not a method
5fill in blank
hard

Fill all three blanks to create a reference to 'backups/2024/january.zip' inside the bucket.

Firebase
const backupRef = bucket.[1]('backups/').[2]('2024/').[3]('january.zip');
Drag options to blanks, or click blank then click option'
Achild
Bref
Attempts:
3 left
💡 Hint
Common Mistakes
Using ref() which resets to root
Using different methods for each blank