update the upload handler to handle more events