Fix regression bug in download task
This commit is contained in:
1 parent
4e57b7124a
commit
47f7282a27
1 file changed
+2
-6
+2
-6
@@ -335,12 +335,8 @@ this.download = (task, methodResponse, callback) ->
|
|||||||
callback(null, STATUS_OK, methodRequest)
|
callback(null, STATUS_OK, methodRequest)
|
||||||
else
|
else
|
||||||
db.filesCollection.findOne({_id : mongodb.ObjectID(String(task.file))}, (err, file) ->
|
db.filesCollection.findOne({_id : mongodb.ObjectID(String(task.file))}, (err, file) ->
|
||||||
if not file?
|
if err or not file?
|
||||||
callback('File not found')
|
return callback(err or new Error('File not found'))
|
||||||
return
|
|
||||||
else if err?
|
|
||||||
callback(err)
|
|
||||||
return
|
|
||||||
|
|
||||||
l = {
|
l = {
|
||||||
protocol : if config.get('FS_SSL') then 'https' else 'http',
|
protocol : if config.get('FS_SSL') then 'https' else 'http',
|
||||||
|
|||||||
Reference in new issue
Block a user