pouchdb/express-pouchdb — pull request #87 by nolanlawson (2014-08-06 03:23:08+00:00)
Title: (#85) - actually implement multipart correctly

Just when I think I understand promises, something
like this comes along. This is probably the 5th time.

So obviously this "promise chain" wasn't working the way I thought, and not all attachments were getting put into the doc before db.put was called.