Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

JSZip library error

New Here ,
Jun 17, 2014 Jun 17, 2014

Hello, guys!

I am trying to use ZIP JavaScript library (https://github.com/Stuk/jszip/blob/master/dist/jszip.js).

zip = new JSZip();

zip.file("hello.txt", "Hello, World!").file("tempfile", "nothing");

zip.folder("images").file("smile.gif", base64Data, {base64: true});

zip.file("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")});

zip.remove("tempfile");

base64zip = zip.generate();

When I run default sample, provided by authors of this library, the Extension Script Editor highlights the first line of my example with an error: JSZip does not have a constructor. Although the JSZip constructor is defined (line 282), the Extension Script does not see it.

Can anybody tell what is wrong with this code for the JSX parser? Is there other useful libraries which to read content of zip files with JavaScript? Backup way is to use console commands, but it is very ugly method))

TOPICS
Scripting
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation