change local file upload location
This commit is contained in:
parent
38a7ac597b
commit
04c96fafc4
|
@ -35,5 +35,5 @@ npm-debug.log
|
|||
/priv/cert/
|
||||
|
||||
dev.secret.exs
|
||||
/uploads/*
|
||||
!/uploads/.gitkeep
|
||||
priv/uploads/*
|
||||
!priv/uploads/.gitkeep
|
|
@ -18,7 +18,7 @@ defmodule EntenduWeb.Router do
|
|||
|
||||
pipeline :authorized_files do
|
||||
plug AuthorizeLink
|
||||
plug Plug.Static, at: "/uploads", from: Path.expand('./uploads'), gzip: false
|
||||
plug Plug.Static, at: "/uploads", from: {:entendu "priv/uploads"}, gzip: false
|
||||
end
|
||||
|
||||
pipeline :authorized_link do
|
||||
|
|
|
@ -37,7 +37,7 @@ defmodule Entendu.EncryptedLink do
|
|||
|
||||
# Override the storage directory:
|
||||
def storage_dir(version, {_file, scope}) do
|
||||
"uploads/links/#{scope.id}"
|
||||
"priv/uploads/links/#{scope.id}"
|
||||
end
|
||||
|
||||
# Provide a default URL if there hasn't been a file uploaded
|
||||
|
|
Loading…
Reference in New Issue