This sample code is use the mongoose-attachments mongoose plugin.