Comments (13)
I tried to append some images manually but I got same result.
archive
.append(fs.createReadStream('/var/www/files/exercises/questions/612_256x256.jpg'), { name: 't_001.jpg' })
.append(fs.createReadStream('/var/www/files/exercises/questions/613_256x256.jpg'), { name: 't_002.jpg' })
.append(fs.createReadStream('/var/www/files/exercises/questions/614_256x256.jpg'), { name: 't_003.jpg' })
.append(fs.createReadStream('/var/www/files/exercises/questions/615_256x256.jpg'), { name: 't_004.jpg' })
.append(fs.createReadStream('/var/www/files/exercises/questions/616_256x256.jpg'), { name: 't_005.jpg' });
The images are not corrupted according to the jpeginfo
and exiftool
.
from node-archiver.
What OS, platform, node version? I've only seen one other report of such errors and that was on Mac OSX which I unfortunately am unable to test locally.
from node-archiver.
The package is generated on Debian Wheezy (7.1), Node v0.10.13
I test zip files on Debian and Mac OS X 10.7.5
UPDATE:
Node was compiled with:
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'clang': 0,
'gcc_version': 47,
'host_arch': 'x64',
'node_install_npm': 'true',
'node_prefix': '',
'node_shared_cares': 'false',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'false',
'node_shared_v8': 'false',
'node_shared_zlib': 'false',
'node_tag': '',
'node_unsafe_optimizations': 0,
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'node_use_systemtap': 'false',
'python': '/usr/bin/python',
'target_arch': 'x64',
'v8_enable_gdbjit': 0,
'v8_no_strict_aliasing': 1,
'v8_use_snapshot': 'true'}}
from node-archiver.
should really be fine, do you get same unzip test results on both platforms? ive only seen it on Mac.
from node-archiver.
do the zips open with Mac's Archive tool?
you might also try listening for output
s close
event, finalize
doesn't always promise that other streams have completed. also, not sure the point of the fs.writeFile
you wrapped it all in?
from node-archiver.
Yes, same results on both.
I moved the response to output.on('close', ...
and moved the code to out of fs.writeFile for tests. Same results. Sometimes - if the zip file don't have "bad zipfile offset" - the file open with success.
If has error, Mac's Archive tool shows an message:
'Unable to unarchive "XYZ.zip" into "FOLDER".
(Error 2 - No such file or directory exists.)'
Mac's Terminal and Debian 7.1 unzip, extract only files without bad offset.
I tried to use tar instead of zip and it worked fine, but I can not give output with tar or tar.gz
Node 0.10.13 changes some things about zlib. That will influence the archiver? http://blog.nodejs.org/2013/07/09/node-v0-10-13-stable/
from node-archiver.
hum don't think node version is the issue. could you email me the file you are testing locally?
from node-archiver.
Yes, of course. What you need? I created a simple test and got the same error. I'll send you.
from node-archiver.
ok, send along that project dir (just need js and package.json, no node_modules) and the zip you get from running it so I can see if the binary contents vary in any key spots.
EDIT: email is on my GH profile.
from node-archiver.
sorry for delay. will try out this coming week.
from node-archiver.
the zip you sent definitely fails 7zip and unzip on Windows for me. wasnt able to do much with the test since I dont have local files to match.
from node-archiver.
can you do me a favor and try running your test with:
var archive = archiver('zip', { zlib: { level: 0 } } );
from node-archiver.
checkout #32 and the latest release.
from node-archiver.
Related Issues (20)
- 压缩后文件的修改时间不正确
- achiver.directory can't use, error with input source must be valid Stream or Buffer instance error HOT 1
- How to zip single file HOT 1
- Dependency Dashboard
- ESM HOT 1
- .directory() generate a empty folder, compress completed will remove the empty folder,could I retain the empty folder?
- Class extends value undefined is not a constructor or null HOT 1
- Is there a way to know how many files were ultimately compressed? HOT 2
- Question: Were there any API changes from 5.3 to 6.x? HOT 1
- Recommendation for an unzip library? HOT 1
- Overwrite existing files
- Missing Release of Resource after Effective Lifetime [High Severity] HOT 1
- zlib level 0 stops the progress of ongoing read streams
- Improve docs around append callback? HOT 1
- How to convert csv to 7z HOT 1
- Heap out of memory with archiver.append() HOT 1
- Append CSV file line by line
- `append()` fails after upgrading from v6 to v7 HOT 4
- Cannot add file named `\` HOT 2
- Archiver Version 7.0 might be breaking due to ESM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-archiver.