JSZip is a javascript library for creating, reading and editing .zip files, with a lovely and simple API.
Example: Download and unzip files
Example: Add files to zip
I mean, it can UNZIP from "Files" folder of Construct?
I think its not working yet. Later i'm looking into it.
I just tried requesting a zip file from my project files using ajax and then loading the zip file from Ajax.LastData but that didn't seem to work (Zipfile Failed to load) :(
macube , Hi, do you have a Construct 2 version of this plugin? I found a post on the forum, but there is no download link.
No, sorry i don't have a construct 2 plugin. This is for construct 3 only.
it can load a zip from local files?
yes, with Pick File object
What is the 'Pick File Object'? You mean the Ajax object?
JSZip causes the program to crash when Worker is enabled (default) in project settings. Is there a fix for this?
macube Hey, I have a question:
What would be the most efficient way to "extract a zip file to a given path"?
Currently, I open the zip file with this plugin, and I read a txt file that is in my zip file that contains a list of names for each file in the zip. Then I do a loop to load each file in the zip as BASE64 into a binary data object, then I use the nwjs plugin to "write file to path" and it does work, but this whole thing is a very slow process. It locks up the whole window for about 20 seconds to deal with 100mb worth of files.
Am I overcomplicating this?
Hi, Any chance you can share the code that you are using to extract a zip files contents?
Thanks
macube Hey just to let you know, I went to your website and sent you an email just now about this plugin, it currently crashes on preview when used.
can you send me the console log when it crashes? thx
Ahh it was "Use worker" set to "On". If I set my project's "Use Worker" to "No", then on preview, there is no crash and everything appears to be working!
Is "worker" a lot of work to add support for? Regardless, I'm so glad that this plugin can be used! I'm not too sure on the real-world benefits of worker mode, but ZIP support is more important to me, so I will continue for now with worker mode off. Thanks!
Console error with worker mode: [C3 runtime] Failed to load all engine scripts in worker: ReferenceError: window is not defined
It seems that you can only save txt files. I tried to save an image but it didn't work
is there a way to work with multiple files in one zip file? i'd like to create a zip with all Sounds and read from it
Hi, thank you for creating this.
Will this allow password input for file extraction OR when creating a zipped archive?
Does this have any file compression or is it for storing files only?
Hi,
password don't work with jsZip, please look here:
stuk.github.io/jszip/documentation/limitations.html