Can't unzip file generated by node-archiver on OSxHow to append to a file in Node?Express-js can't GET my static files, why?how to fix UNMET DEPENDENCY errors on expressJSnode-archiver: Archive multiple directoriesnode JS client vs serverPermissions issue using node-archiverError building with webpackExpress req.body not WorkingNodeJs API give destination path to product imageNode Archiver 'Headers Error' when unzipping large files (above 4GB)
How to make clear to people I don't want to answer their "Where are you from?" question?
Creating a histogram using custom data
Helping ease my back pain by studying 13 hours everyday , even weekends
What is the origin of Scooby-Doo's name?
What does it mean to not be able to take the derivative of a function multiple times?
Why is oilcloth made with linseed oil?
Methodology: Writing unit tests for another developer
What do they call philosophers in China?
Music theory behind A chord in the key of G
How do I professionally let my manager know I'll quit over an issue?
I found a password with hashcat, but it doesn't work
Hit the Bulls Eye with T in the Center
Can humans ever directly see a few photons at a time? Can a human see a single photon?
How can lift be less than thrust that is less than weight?
How can I bring back a dead main character without cliches?
UK - Working without a contract. I resign and guy wants to sue me
How do I farm creepers for XP without them exploding?
Can the pre-order traversal of two different trees be the same even though they are different?
career in signal processing
Is there a term for the belief that "if it's legal, it's moral"?
Do I have to explain the mechanical superiority of the player-character within the fiction of the game?
Can Ogre clerics use Purify Food and Drink on humanoid characters?
"Correct me if I'm wrong"
Too early in the morning to have SODA?
Can't unzip file generated by node-archiver on OSx
How to append to a file in Node?Express-js can't GET my static files, why?how to fix UNMET DEPENDENCY errors on expressJSnode-archiver: Archive multiple directoriesnode JS client vs serverPermissions issue using node-archiverError building with webpackExpress req.body not WorkingNodeJs API give destination path to product imageNode Archiver 'Headers Error' when unzipping large files (above 4GB)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:
app.post('/', (req, res) => );
And here is some sample JSON I pass through:
"title": "Sample Title",
"files": [
"name": "index.html",
"content": "<p>Hello, World!</p>"
,
"name": "README.md",
"content": "# Hello, World!"
]
But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."
The code I changed is:
const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);
I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?
node.js express node-archiver
add a comment |
I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:
app.post('/', (req, res) => );
And here is some sample JSON I pass through:
"title": "Sample Title",
"files": [
"name": "index.html",
"content": "<p>Hello, World!</p>"
,
"name": "README.md",
"content": "# Hello, World!"
]
But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."
The code I changed is:
const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);
I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?
node.js express node-archiver
Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.
– Terry Lennox
Mar 25 at 9:56
1
@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.
– Cassidy Williams
Mar 25 at 17:08
add a comment |
I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:
app.post('/', (req, res) => );
And here is some sample JSON I pass through:
"title": "Sample Title",
"files": [
"name": "index.html",
"content": "<p>Hello, World!</p>"
,
"name": "README.md",
"content": "# Hello, World!"
]
But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."
The code I changed is:
const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);
I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?
node.js express node-archiver
I'm generating a compressed file based on JSON data. Currently, when I generate a TAR file, my API works just fine. Here's my code:
app.post('/', (req, res) => );
And here is some sample JSON I pass through:
"title": "Sample Title",
"files": [
"name": "index.html",
"content": "<p>Hello, World!</p>"
,
"name": "README.md",
"content": "# Hello, World!"
]
But, when I change this to generate a ZIP file, I get errors like 21 "Is a directory" or 2 "No such file or directory."
The code I changed is:
const filename = 'export.zip';
const archive = archiver('zip',
zlib: level: 9 ,
);
I've tried looking at other questions and issues, but haven't had any luck when making store: true or moving finalize() or making forceZip64: true. What can I change to make ZIP files work correctly?
node.js express node-archiver
node.js express node-archiver
edited Mar 25 at 17:09
Cassidy Williams
asked Mar 25 at 7:37
Cassidy WilliamsCassidy Williams
1,31222050
1,31222050
Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.
– Terry Lennox
Mar 25 at 9:56
1
@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.
– Cassidy Williams
Mar 25 at 17:08
add a comment |
Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.
– Terry Lennox
Mar 25 at 9:56
1
@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.
– Cassidy Williams
Mar 25 at 17:08
Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.
– Terry Lennox
Mar 25 at 9:56
Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.
– Terry Lennox
Mar 25 at 9:56
1
1
@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.
– Cassidy Williams
Mar 25 at 17:08
@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.
– Cassidy Williams
Mar 25 at 17:08
add a comment |
1 Answer
1
active
oldest
votes
This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.
app.post('/', (req, res) => );
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55333125%2fcant-unzip-file-generated-by-node-archiver-on-osx%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.
app.post('/', (req, res) => );
add a comment |
This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.
app.post('/', (req, res) => );
add a comment |
This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.
app.post('/', (req, res) => );
This did the trick! By creating the output with createWriteStream and then piping the archive to that, we are able to download a zip that works perfectly.
app.post('/', (req, res) => );
answered Mar 25 at 22:05
Cassidy WilliamsCassidy Williams
1,31222050
1,31222050
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55333125%2fcant-unzip-file-generated-by-node-archiver-on-osx%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Not sure how much help this is, but on my environment (Windows 10, build 17763, Node v10.15.1, your code works perfectly well.. I'm testing with Postman, the export.zip file opens as expected.
– Terry Lennox
Mar 25 at 9:56
1
@TerryLennox thank you for letting me know! That is somewhat helpful; lets me know that it's a Mac thing I have to look out for.
– Cassidy Williams
Mar 25 at 17:08