add method to save one file and change method name in trait and save file type in db