change local file upload location

This commit is contained in:
Silas 2022-02-24 02:09:40 -05:00
parent 38a7ac597b
commit 04c96fafc4
Signed by: silentsilas
GPG Key ID: 4199EFB7DAA34349
4 changed files with 4 additions and 4 deletions

4
.gitignore vendored
View File

@ -35,5 +35,5 @@ npm-debug.log
/priv/cert/
dev.secret.exs
/uploads/*
!/uploads/.gitkeep
priv/uploads/*
!priv/uploads/.gitkeep

View File

@ -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

View File

@ -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