                     # file.
                     log.info "Attachment #{name} saved to Couch."
                     res.send 201, success: true
+                    next()
 
             part.pipe stream
 

        next err

    form.on 'close', ->
        res.send 400, error: 'No file sent' if nofile
        next()


# GET /data/:id/attachments/:name

            stream.pipe res



# DELETE /data/:id/attachments/:name
# Remove given attachment (represented by name) from given document
# (represented by id).
