阅读背景:

Expressjs:res.download期间的图像文件编码问题

来源:互联网 

I have a pretty run-of-the-mill node.js server with expressjs installed locally for development purposes; I store various files and request them via a basic HTTP call that returns the file through express' res.download feature. Most of the time, this works without a hitch. For a very small subset of files, however, the end-user receives a file that is much larger than expected (almost 2x) and is unreadable by any conventional viewer. Out of maybe a hundred files, this has only happened twice, and both were JPG files, but the sample is too small to draw any conclusion. What I know : I have a pretty run-of-the-mill node.js server




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: