fix add attach file db problem