mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-23 00:14:48 +00:00
2f2c538cc9
Signed-off-by: Thomas Citharel <tcit@tcit.fr> Make Logger.debug calls lazy Signed-off-by: Thomas Citharel <tcit@tcit.fr> Add missing @moduledocs Signed-off-by: Thomas Citharel <tcit@tcit.fr> Refactor according to credo Signed-off-by: Thomas Citharel <tcit@tcit.fr> Final fixes and add credo to CI Signed-off-by: Thomas Citharel <tcit@tcit.fr> Closes #52
18 lines
312 B
Elixir
18 lines
312 B
Elixir
defmodule MobilizonWeb.UploadPlug do
|
|
@moduledoc """
|
|
Plug to intercept uploads
|
|
"""
|
|
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
|