Different prefix, same controller/template

I use cakephp 3 :heart_eyes:, I have a plugin that could be used with/without prefix or different prefix.
How I must do the route to use same controller/template?

  • /admin/media/medias/upload
  • /member/media/medias/upload
  • /media/medias/upload

that use /plugins/Media/src/Controller/MediasController.php

something like ["plugin"=>"Media","controller"=>"medias","action"=>"upload"] should do the trick

no, I need to use the prefix because I have to check user session before when use some prefix.