-1
I’m here with an angle panel for maintenance. All I need to do is upload a pdf file to the server, and return the download url of this same file. But I’m bumping into this mistake and I can’t move. I have researched several places, tried several solutions and none solved my problem. Could anyone tell me how I can fix this error?
My piece of code is:
enviarNotaFiscal() {
console.log('upando a nota fiscal');
const name = this.notaFiscal.name;
const ref = this.afs.ref(`notasfiscais/nota.pdf`);
const task = ref.put(this.notaFiscal);
task.percentageChanges().subscribe(data => {
console.log(data);
});
task.then(data => {
data.ref.getDownloadURL().then(result => {
console.log(result);
})
.catch((error) => {
console.error(error);
});
})
.catch((error) => {
console.error(error);
});
}
The error that returns me on the console is:
The most interesting that this code is the same that I usually use in my projects, therefore I believe that the problem is in the configuration of the firebase project or something, however as I did not start this project, I do not know answer.
Any help will be welcome.