c22joe c22joe -4 years ago 87
Javascript Question

Windows 10 Universal Application - Can I unzip files in the application using pure JavaScript?

I've got a Cordova hybrid application for Android and iOS that I'm trying to port over to the Windows 10 platform. The issue I'm having is that the plugin I was originally using https://github.com/MobileChromeApps/cordova-plugin-zip is not supported for Windows.

So far I've tried tweaking https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/Compression to unzip a file but it doesn't look like it can handle .zip extensions. The sample is setup to use ".compressed" and ".decompressed" file extensions.

I've also tried using https://gildas-lormeau.github.io/zip.js/ but was still unable to get it to unzip my file. I tested this solution locally on chrome to make sure I had it working but when I tested it in my application it threw an error of "unable to read file".

Any ideas on how to unzip a file in my Windows 10 application?

Thanks in advance.

Answer Source

Using the updated code in github.com/MobileChromeApps/cordova-plugin-zip/pull/60. I merged it with a clone of the repo and made a public repo. github.com/Culture22/cordova-windows10-zip

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download