Updated upload handler.