   sendFiles: (request) ->
     return unless @outPorts.file.isAttached()
     for name, obj of request.files
-      @outPorts.file.send(obj)
+      @outPorts.file.beginGroup uuid()
+      @outPorts.file.send obj
+      @outPorts.file.endGroup()
 
 exports.getComponent = -> new ReceiveFiles

noflo = require 'noflo'
express = require 'express'

class ReceiveFiles extends noflo.Component
  icon: 'files-o'

        @sendError("No files attached")
    @inPorts.in.on 'disconnect', () =>
      @outPorts.file.disconnect() if @outPorts.file.isConnected()
    @inPorts.in.on 'endgroup', () =>
      return unless @outPorts.out.isAttached()
      @outPorts.out.endGroup()
    @inPorts.in.on 'disconnect', () =>
      return unless @outPorts.out.isConnected()
      @outPorts.out.disconnect()

  sendError: (msg) ->
    @error new Error msg
