Hi Team,
I am trying to unzip a file using cordova-plugin-zip plugin as mentioned in the example of ionic native.
Not working, it always gives me -1 result.
My code is below -
unZipping() {
this.zip.unzip('file:///data/user/0/xyz/files/sample/sample.zip', this.file.dataDirectory, (progress) => console.log('Unzipping, ' + Math.round((progress.loaded / progress.total) * 100) + '%'))
.then((result) => {
if (result === 0) console.log('SUCCESS');
if (result === -1) console.log('FAILED');
},(error:Response) =>{
console.log('error>>zipping>>>', error);
});
}
Appreciated.
Thank you
Satish