A C2 plugin that uses the JSZip library. Manage zip archives in the browser.
Updated : 2015-5-17
[attachment=0:3uj6a95n][/attachment:3uj6a95n]
Feedback is always welcome.
Thanks for sharing!
Noncentz705
Hello!
I'm trying to zip images loaded with FileChooser this way:
1. Pick file 001.jpg (53 Kb) with FileChooser 2. Create archive with tag "img" 3. Add image with dataURL 'FileChooser.FileURLAt(0)' with name "001.jpg" to archive with tag "img" 4. Invoke download archive with tag "img" with name "archive.zip" (no matter Compression is true or false) [/code:2k3ggz9w] And then I have archive.zip (1 Kb) with file 001.jpg (48 bytes) inside and of course image is bad, no data. Image is correct and has image/jpeg MIME type. FileChooser.FileURLAt(0) is correct too, because Sprite loads it well with Sprite - Load Image from URL action. Where am I wrong? What is wrong? What did I forget? P.S. And also what mean actions Clear Texture and Get Texture? ---------------------------- UPDATE I've just understand my mistake. URL is not dataURL. Now I make an image conversion to base64 string with "Extract sprite to base64 string" plugin by @Pode and all works good. Another question is: any ways to make dataURL? For example without base64. 53 Kb image converts to 300 Kb image. It's very BAD!!!
Noncentz705 Man, I've just received a private message from you but I can't answer because of reputation limitations..
Maybe you can write me your e-mail for better communication?
I want to know more about your brand-new version! The plugin is great in simplicity. And I'm confused that it is only one.. great luck that I found your plugin.
I found another zip files library - zip.js
NickRimer
Is it possible to transfer image to blob object, instead of base64 string? So the size might not be huge.
How can i read text from a zip file?
i try this jszip.readText("texfile.txt","zipfilename\n")
rexrainbow bro help me please
Develop games in your browser. Powerful, performant & highly capable.
jabedbd
Sorry, I had not used this plugin yet.
jabedbd you might have your parameters mixed up.
The first argument is the archive tag name, the second is the path to the file.
If you still have trouble send me a minimal capx to check out showing the error.
jszip.readText("","folder/sub/foo.txt")
Bro, still not work
Please check my capx file .....https:// dl. dropboxusercontent .com /u/52900611/capx/ test.capx
—
Do you give me the capx file? I don'nt understand how can you add the "get binary" function
Noncentz705 bro
jabedbd you may need to update your version of the plugin.
(redownload and check the examples in the /project folder)
jabedbd you may need to update your version of the plugin. (redownload and check the examples in the /project folder)
yes bro ! now its working fine. thanks a lot
No problem, glad to help.