Skip to content

Commit

Permalink
Only delete file after timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
tuliooassis committed Feb 8, 2023
1 parent 39f596c commit 12f17ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/server/WebServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ module.exports = class WebServer extends ExportServer {
}, options);

app.use(addRequestId);
app.use(bodyParser.json({ limit : options.maximum || '5000mb' }));
app.use(bodyParser.urlencoded({ extended : false, limit : options.maximum || '5000mb' }));
app.use(bodyParser.json({ limit : options.maximum || '50mb' }));
app.use(bodyParser.urlencoded({ extended : false, limit : options.maximum || '50mb' }));

//Set CORS
if (options.cors !== 'false') {
Expand Down Expand Up @@ -94,7 +94,7 @@ module.exports = class WebServer extends ExportServer {
res.set('Content-Length', file.buffer.length);
res.status(200).send(file.buffer);

delete me.files[fileKey];
// delete me.files[fileKey]; // Only delete after 5 minutes
}
else {
res.send('File not found');
Expand Down

0 comments on commit 12f17ae

Please sign in to comment.