title: Upgrade Guide layout: default
ZipObject#options
, the attributes date
and dir
have been
deprecated and are now on ZipObject
.ZipObject#options
, the attributes base64
and binary
have been
deprecated.JSZip.base64
, JSZip.prototype.crc32
, JSZip.prototype.utf8decode
,
JSZip.prototype.utf8encode
and JSZip.utils
have been deprecated.
// deprecated
zip.file("test.txt").options.date
zip.file("test.txt").options.dir
// new API
zip.file("test.txt").date
zip.file("test.txt").dir
JSZipBase64
has been renamed to JSZip.base64
.data
attribute doesn't exist anymore :
use the getters asText()
, asBinary()
, etccompressInputType
and uncompressInputType
attributes.Example for the data attribute :
// before
zip.file("test.txt").data;
zip.files["test.txt"].data;
zip.file("image.png").data;
zip.files["image.png"].data;
// after
zip.file("test.txt").asText();
zip.files["test.txt"].asText();
zip.file("image.png").asBinary();
zip.files["image.png"].asBinary();