adding the doc for how to set up attachment funtion.