Fix: upload dir
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-12-13 15:46:29 +01:00
parent 597aa1f2e0
commit 69ba0245bb
2 changed files with 2 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ config :confient, ConfientWeb.Endpoint,
secret_key_base: secret_key_base secret_key_base: secret_key_base
config :confient, config :confient,
base_upload_dir: System.get_env("CONFIENT_BASE_UPLOAD_DIR", "/srv/confient/uploads"), upload_dir: System.get_env("CONFIENT_UPLOAD_DIR", "/srv/confient/uploads"),
timezone: System.get_env("CONFIENT_TIMEZONE", "Europe/Paris"), timezone: System.get_env("CONFIENT_TIMEZONE", "Europe/Paris"),
domain: System.get_env("CONFIENT_DOMAIN", "http://localhost:4000") domain: System.get_env("CONFIENT_DOMAIN", "http://localhost:4000")

View File

@@ -79,7 +79,7 @@ defmodule ConfientWeb.AssignmentController do
conn |> put_flash(:error, "Devoir inexistant") |> redirect(to: "/") conn |> put_flash(:error, "Devoir inexistant") |> redirect(to: "/")
assignment -> assignment ->
base = Application.get_env(:confiant, :base_upload_dir, "/tmp/confient/uploads") base = Application.get_env(:confiant, :upload_dir)
files = files =
Enum.map(assignment.students_works, fn v -> v.path end) Enum.map(assignment.students_works, fn v -> v.path end)