index.js
function taskMinus() {
      taskCounter--
      if (taskCounter === 0) {
        // Time to respond
        if (files.length === 0) {
          res.send(200, {
            result: 'no files to upload',
            files
          })
        } else {
          res.send(201, {
            result: 'upload OK',
            files
          })
        }
        next()
      }
    }
function taskMinus() {
      taskCounter--
      if (taskCounter === 0) {
        // Time to respond
        if (files.length === 0) {
          res.send(200, {
            result: 'no files to upload',
            files
          })
        } else {
          res.send(201, {
            result: 'upload OK',
            files
          })
        }
        next()
      }
    }
function taskMinus ( ) { taskCounter -- if ( taskCounter === 0 ) { // Time to respond if ( files . length === 0 ) { res . send ( 200 , { result : 'no files to upload' , files } ) } else { res . send ( 201 , { result : 'upload OK' , files } ) } next ( ) } }
call this one after any subtask is finished
call this one after any subtask is finished