Repository navigation
Replies: 3 comments
|
here is my test code const app = express();
app.post('/_/file/upload/put_file', (req: Request, res: Response) => {
const fileStream = req.pipe(fs.createWriteStream('afse'));
fileStream.on('finish', () => {
res.send('success');
});
fileStream.on('error', (err: Error) => {
res.status(500).send('failed');
});
req.on('error', (err: Error) => {
console.log(`${new Date()} req err ${err}`);
});
req.on('close', () => {
console.log(`${new Date()} req close`);
});
res.on('error', (err: Error) => {
console.log(`${new Date()} res err ${err}`);
});
res.on('close', () => {
console.log(`${new Date()} res close`);
});
});
const port = 4000;
app.listen(port, () => {
console.log(`${port}`);
});
`` |
0 replies
|
i try to set request timeout and response timeout , but it is not useful |
0 replies
Try this
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
when i use node:18.13.0 and express:4.18.2 to upload file, Uploading will fail between 5 minutes and 6 minutes.
Firstly, response will emit "close". Secondly, request will be aborted.
All reactions