Я получаю ошибку TypeError: _Firebase_index__WEBPACK_IMPORTED_MODULE_1__.default.ref is not a function
Ниже приведен соответствующий код ошибки.
handleUpload = () => {
const { image } = this.state;
const uploadTask = storage.ref(`images/${image.name}`).put(image);
uploadTask.on(
"state_changed",
snapshot => {
// progress function ...
const progress = Math.round(
(snapshot.bytesTransferred / snapshot.totalBytes) * 100
);
this.setState({ progress });
},
error => {
// Error function ...
console.log(error);
},
() => {
// complete function ...
storage
.ref("images")
.child(image.name)
.getDownloadURL()
.then(url => {
this.setState({ url });
});
}
);
Я пытался создать console.log
ошибку, но ничего не появляется.