I can send/take data with Firestore. But when I am trying to upload file to firebase storage, i took the following error. Have you ever faced this error? How can i handle it?
Uncaught ReferenceError: XMLHttpRequest is not defined Kontext ...gstatic.com/firebasejs/9.6.11/firebase-storage.js
var fileId = `${request.payload.getFileName}`; //value from html
const app = initializeApp(firebaseConfig);
const storage = getStorage(app);
const storageRef = ref(storage, fileId);
const metadata = {
contentType: 'image/jpeg',
};
const uploadTask = uploadBytesResumable(storageRef, fileId, metadata);