Extract upload file method. Edit form can support upload