Skip to content

Commit

Permalink
feat(uploads): add contentLength for direct download progress ✨
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBrisorgueil committed May 4, 2020
1 parent 0550edd commit dea967a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/uploads/controllers/uploads.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ exports.get = async (req, res) => {
responses.error(res, 422, 'Unprocessable Entity', errors.getMessage(err))(err);
});
res.set('Content-Type', req.upload.contentType);
res.set('Content-Length', req.upload.length);
stream.pipe(res);
} catch (err) {
responses.error(res, 422, 'Unprocessable Entity', errors.getMessage(err))(err);
Expand Down

0 comments on commit dea967a

Please sign in to comment.