update file to db