add apply action and upload function