Get attachments and store them when we get a document