Yes i used another method entirely
Maybe this will help you
async uploadFile(path,filename)
{
const buffer = await this.file.readAsArrayBuffer(path,filename);
const fileBlob = new Blob([buffer], {type: 'image/jpg'});
const randomId = Math.random().toString(36).substring(2,8);
const uploadTask = this.angularStorage.upload(`files/${randomId}.jpg`,fileBlob)
const ref = this.angularStorage.ref(`files/${randomId}.jpg`);
uploadTask.percentageChanges().subscribe(changes =>{
this.uploadProgress = changes;
});
uploadTask.then(res =>{
const downLoadUrl = ref.getDownloadURL().subscribe((url_img) => {
this.submitPostWithImg(url_img);
});
this.presentToast('Upload finished');
});
}