adm-zip
adm-zip copied to clipboard
one question zip files with 0 bytes
Hi, how are you ?
I want to zip those files, It do the compress, but when I want to open the zip file, this has 0 bytes !!!
var zip = new admZip();
zip.addLocalFile("/home/xmazzuce/Downloads/004534111.PDF"); zip.addLocalFile("/home/xmazzuce/Downloads/004534107.PDF"); zip.addLocalFile("/home/xmazzuce/Downloads/004534117.PDF"); zip.addLocalFile("/home/xmazzuce/Downloads/004209531.PDF");
zip.writeZip(/target file name/"/home/xmazzuce/apps/wells/files.zip");
I'm doing something wrong ???

This is the permission issue in Linux Distros. Run the same code in Windows and try. If you see those files in windows please let me know.
I have the same symptoms in my code. On redhat, zip file shows the files there with size of 0 bytes. I am able to extract and view them correctly. If i copy the zip to a Windows platform, it shows as empty. If I try to "extract all" it shows that it is trying to extract the files, but then complains that the files (which are about 1K) are too big for the filesystem.
if (!attr) {
if (entry.isDirectory) {
attr = (040755 << 16) | 0x10;
}
else {
attr = 0644 << 16;
}
}
There is a permission issue. Please use this code in adm-zip.js (in the adm-zip module). Let me know the result
I am having the same issue... The zip will extract proper files on OSX but not on Windows or *Nix.
I have commented above, please the refer that comment. That is a standard solution. Thanks
I have commented above, please the refer that comment. That is a standard solution. Thanks
Where am I supposed to add that code in adm.js file? What line number?
Yes someone please mention where to add the code