expressjs / expressjs/multer

[new-api] upload folder cleaning

Open
#568 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
12.1k
Forks
1.1k
Avg merge
8d 2h
Merged PRs (30d)
21

Description

How to read from stream?
```
data.file[0].stream
.on("data", function(chunk) {
console.log("chunk", chunk);
})
.on("end", function() {
console.log("end");
});
```
does not work without call `open()` and REMOVING this code
```
file.stream.on('open', function () {
fs.unlink(file.path, function () {})
})
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the upload using the shown data.file[0].stream data and end handlers, then compare it with the file.stream open handler and fs.unlink cleanup. No source files or tests are named; done means establishing the expected stream and cleanup behavior and documenting or correcting the failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.