Skip to content

Commit d05fc56

Browse files
committed
Node sample fix.
res.send(200) will always return success when checking if the file has been uploaded before; maybe an express res.send API change that happened along the way.
1 parent 7ac9f22 commit d05fc56

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

samples/Node.js/app.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ app.post('/upload', multipartMiddleware, function(req, res) {
3636
app.get('/upload', function(req, res) {
3737
flow.get(req, function(status, filename, original_filename, identifier) {
3838
console.log('GET', status);
39-
res.send(200, (status == 'found' ? 200 : 404));
39+
res.send(status == 'found' ? 200 : 404);
4040
});
4141
});
4242

4343
app.get('/download/:identifier', function(req, res) {
4444
flow.write(req.params.identifier, res);
4545
});
4646

47-
app.listen(3000);
47+
app.listen(3000);

0 commit comments

Comments
 (0)