uri to mid