 
     form.on 'close', ->
         log.info 'attachement form fully parsed'
+        res.send 201, success: true
+        next()
 
 
 # GET /data/:id/attachments/:name

log =  require('printit')
    date: true
    prefix: 'attachment'
Readable = require('stream').Readable

db = require('../helpers/db_connect_helper').db_connect()
deleteFiles = require('../helpers/utils').deleteFiles

            stream = db.saveAttachment req.doc, fileData, (err) ->
                if err
                    console.log "[Attachment] err: " + JSON.stringify err
                    form.emit 'error', new Error err.error
                    # We end the request because we expect to have only one
                    # file.

            part.pipe stream

