I am trying to make a page that lets you upload a file and search for certain values in it, but when I am trying to fetch the file from firebase storage it is giving me an error
Access to fetch at 'theurl' from origin 'mysite' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Yes, I have tried to set the mod to no-cors, which kinda works but the fetch returns a blank txt file. Here is my code, please help. Thanks
storageRef.child('thefilepath').getDownloadURL().then(function (url) {
document.getElementById("atextbox").value = url
})
var dictionaryurl = document.getElementById("atextbox").value
fetch(dictionaryurl)
.then(r => r.text())
.then(t => {mycodethatrunsafter});