b54dae7e15
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
16 lines
261 B
Elixir
16 lines
261 B
Elixir
defmodule MobilizonWeb.UploadPlug do
|
|
use Plug.Builder
|
|
|
|
plug(Plug.Static,
|
|
at: "/",
|
|
from: {:mobilizon, "./uploads"}
|
|
)
|
|
|
|
# only: ~w(images robots.txt)
|
|
plug(:not_found)
|
|
|
|
def not_found(conn, _) do
|
|
send_resp(conn, 404, "not found")
|
|
end
|
|
end
|