Fix media endpoint request, but need to flatten array on client side.