I am attempting to upload an image to my firebase firestore storage bucket. Thus funciton below implements but only uploads a new child as text and not the image it's self.
How can I get the image to upload as a .jpeg/.png or does it have to be converted to some other file type for this to work?
When I use this method:
const testImage = require('../assets/mom.png')
is returning the value '13' in my console.
const storage = firebase.storage();
const sendToStorage = () => {
const testImage = require('../assets/mom.png')
const ref = storage.ref()
.child('another-child');
ref.put(testImage).then((snapshot) => {
console.log('Uploaded a blob or file!');
});
}