I am trying to store images to firebase storage, I am using node.js.
import * as admin from 'firebase-admin';
admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://xxx-app.firebaseio.com',
storageBucket: 'xxxx-app.appspot.com'
});
function storeHeadShots(){
const bucket = admin.storage().bucket();
bucket.upload('./headshots/Acker.W.png', function(err, file){
if (!err){
console.log('file uploaded')
} else {
console.log('error uploading image: ', err)
}
});
}
storeHeadShots();
Now the above works fine, but I have a folder in storage users/
and inside this folder I am storing images. How do I access this folder ?