Expressjs download zip file






















Sign in to your account. When I download this file from the browser I get the following error when unzipping the file. Any thoughts on what is wrong here? I imagine the problem is on my end but I am unable to nail down the problem. The text was updated successfully, but these errors were encountered:. Sorry, something went wrong. I'm not sure if we have any good answers for you unless you can diagnose the issue or upload the ZIP file somewhere for us and provide a full express example where you use res.

We'll also need to know the version of express you are using and the version of node you are running your app on. Let me try to duplicate the issue on a simple project and I will setup a github project for someone to have a look. I will get you all the other information as well. The problem seems to be related to either setup generated by yeoman because this project barely has any changes from generated code. When I tried a simpler test where there was no yeoman generated code.

To me this deduces the problem to the setup generated by yeoman but obviously I can be wrong about that. Between the working example and the not working example the only difference is the actual content-length in the header. So any ideas what could cause the content length to be wrong? I suspect its an encoding issue of some sort when reading the file but I am not sure what in the configuration could affect that.

Oh, I didn't do the bower install or grunt serve steps. Perhaps that makes a difference? Nope, I did those two steps now and still the same successful result for me. I will note I am using node. I just swapped to 0. I have not been able to reproduce your issue yet. I am closing this for now since both your repos are working for me on node. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.

The Overflow Blog. Podcast what if you could invest in your favorite developer? Who owns this outage? Building intelligent escalation chains for modern SRE. Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Related Learn more. Asked 3 years, 10 months ago. Active 3 years, 10 months ago. Viewed 5k times.

Am I missing something? Thanks in advance! Improve this question. Maximilian Schmidt Maximilian Schmidt 2 2 silver badges 9 9 bronze badges. Add a comment. Active Oldest Votes. Try to set Content-Disposition header with the value of attachment to indicate to firefox that the file should be downloaded: res.

Improve this answer. YouneL YouneL 7, 2 2 gold badges 23 23 silver badges 47 47 bronze badges. What happen if you try res.



0コメント

  • 1000 / 1000