const options2: CameraOptions = {
sourceType: this.camera.PictureSourceType.SAVEDPHOTOALBUM,
destinationType: this.camera.DestinationType.FILE_URI,
mediaType: this.camera.MediaType.ALLMEDIA,
}
Camera.getPicture(options2).then((url) => {
console.log('upload video start!!!!!')
console.log(url);
(window as any).resolveLocalFileSystemURL("file://"+url,FE=>{
console.log(FE);
FE.file(file=>{
console.log(file);
const FR=new FileReader()
FR.readAsArrayBuffer(file)
console.log(FR);
FR.onloadend=((res:any)=>{
console.log(res);
let AF=res.target.result;
console.log(AF);
let blob=new Blob([new Uint8Array(AF)],{type:'video/mp4'});
console.log(blob);
firebase.storage().ref().child('video').put(blob).then(()=>{
console.log('upload video end!!!!')
})
})
})
})
console.log(res);
res.target.result is output null.
then uploaded on storage, but 0 byte of data was uploaded.
Please let me know how to solve this problem.
1 post - 1 participant