modify attach file data model
modify several functions