modified Record and controller to upload image