فهرست منبع

Pass pipeline errors onto 'next' error handler

Simon Detheridge 6 سال پیش
والد
کامیت
e27cf4db7b
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      services/filestore/app/js/FileController.js

+ 3 - 2
services/filestore/app/js/FileController.js

@@ -17,7 +17,7 @@ module.exports = {
   directorySize
 }
 
-function getFile(req, res) {
+function getFile(req, res, next) {
   const { key, bucket } = req
   const { format, style } = req.query
   const options = {
@@ -61,7 +61,8 @@ function getFile(req, res) {
     }
 
     logger.log({ key, bucket, format, style }, 'sending file to response')
-    pipeline(fileStream, res)
+
+    pipeline(fileStream, res, next)
   })
 }