Showing
1 changed file
with
2 additions
and
2 deletions
@@ -63,7 +63,8 @@ exports.uploadFile = function (req, res) { | @@ -63,7 +63,8 @@ exports.uploadFile = function (req, res) { | ||
63 | headers: headers | 63 | headers: headers |
64 | }, function optionalCallback(error, httpResponse, body) { | 64 | }, function optionalCallback(error, httpResponse, body) { |
65 | if (error) { | 65 | if (error) { |
66 | - return console.error('upload failed:', error); | 66 | + console.error('upload failed:', error); |
67 | + res.json(errBackMsg); | ||
67 | } | 68 | } |
68 | if (!error && httpResponse.statusCode == 200) { | 69 | if (!error && httpResponse.statusCode == 200) { |
69 | var json = JSON.parse(body); | 70 | var json = JSON.parse(body); |
@@ -116,7 +117,6 @@ exports.uploadFile = function (req, res) { | @@ -116,7 +117,6 @@ exports.uploadFile = function (req, res) { | ||
116 | message: '上传成功', | 117 | message: '上传成功', |
117 | status: true | 118 | status: true |
118 | }); | 119 | }); |
119 | - return; | ||
120 | } | 120 | } |
121 | }else{ | 121 | }else{ |
122 | res.json(errBackMsg); | 122 | res.json(errBackMsg); |
-
Please register or login to post a comment