Question about how to route this in Phoenix

I googled and search ElixirForum but can’t find a solution for this, sorry for asking might be silly question :- :sweat_smile:

I don’t know how to create a Phoenix Route for this: the ID(or name) part actually has parent folders in it.
a ID like this: “-/project_members/new_york/img_small/240x180.png”

https://gitlab.example.dev/internal/cloud/-/project_members/new_york/img_small/240x180.png

For the route above, Phoenix complain about this:

 ** (Phoenix.Router.NoRouteError) no route found for GET /internal/cloud/-/project_members/new_york/img_small/240x180.png (HelloWeb.Router)

The route.ex source:

 scope "/internal", HelloWeb do
    pipe_through :browser5

    get "/cloud", Controller, :cloud_index
 end

Any idea about this? really thanks :slight_smile:

I found the answer here :slight_smile:

Ah, the famous pokemon route:

get "/*path"
You will find the paths inside conn.params["path"] or as conn.path_info.

thanks to @josevalim

here is output:

16:31:35.492 request_id=Fq6c9hPtTyAiNGkAABUD [debug] Processing with HelloWeb.SomeController.index_with_path/2
  Parameters: %{"path" => ["-", "project_members", "new_york", "img_small", "240x180.png"]}
  Pipelines: [:browser5]