Make Categories a predefined list

Signed-off-by: Thomas Citharel <tcit@tcit.fr>

Allow null values for categories for now

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-02-22 16:54:01 +01:00
parent 75554cd3f5
commit 7086fe8389
27 changed files with 89 additions and 655 deletions

View File

@@ -30,10 +30,9 @@ defmodule MobilizonWeb.Uploaders.Category do
"#{title}_#{version}"
end
# TODO : When we're sure creating a category is secured and made possible only for admins, use category name
# Override the storage directory:
def storage_dir(_, _) do
"uploads/categories/"
"uploads/event/"
end
# Provide a default URL if there hasn't been a file uploaded