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