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)
|
||||
else
|
||||
db.filesCollection.findOne({_id : mongodb.ObjectID(String(task.file))}, (err, file) ->
|
||||
if not file?
|
||||
callback('File not found')
|
||||
return
|
||||
else if err?
|
||||
callback(err)
|
||||
return
|
||||
if err or not file?
|
||||
return callback(err or new Error('File not found'))
|
||||
|
||||
l = {
|
||||
protocol : if config.get('FS_SSL') then 'https' else 'http',
|
||||
|
||||
Reference in new issue
Block a user