File corruption on zip uploads
- Dominant language
- JavaScript
- Stars
- 12.1k
- Forks
- 1.1k
- Avg merge
- 8d 2h
- Merged PRs (30d)
- 21
Description
```
[DEVELOPMENT]xxx@xxx-tmp:# unzip e4b18df04249047c0f88a0a141956246
Archive: e4b18df04249047c0f88a0a141956246
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
note: e4b18df04249047c0f88a0a141956246 may be a plain executable, not an archive
unzip: cannot find zipfile directory in one of e4b18df04249047c0f88a0a141956246 or
e4b18df04249047c0f88a0a141956246.zip, and cannot find e4b18df04249047c0f88a0a141956246.ZIP, period.
```
Code:
```
// Workspace upload
let multer = require('multer')({
dest: `${global.config.tmp.root}`
})
app.use('/workspace/upload/util', multer.single('file'), function (req, res, next) {
..
..
```
Let me know if the above could be caught as an error. If yes, how?
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.