Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
45627dde
Commit
45627dde
authored
Apr 05, 2018
by
lain
Browse files
Merge branch 'develop' into 'develop'
Fix failure to serve media from custom upload path See merge request
!95
parents
d70d1c42
033771d9
Pipeline
#1101
passed with stage
in 2 minutes and 48 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
lib/pleroma/upload.ex
View file @
45627dde
...
@@ -58,7 +58,7 @@ def store(%{"img" => "data:image/" <> image_data}) do
...
@@ -58,7 +58,7 @@ def store(%{"img" => "data:image/" <> image_data}) do
}
}
end
end
def
p
upload_path
do
def
upload_path
do
settings
=
Application
.
get_env
(
:pleroma
,
Pleroma
.
Upload
)
settings
=
Application
.
get_env
(
:pleroma
,
Pleroma
.
Upload
)
Keyword
.
fetch!
(
settings
,
:uploads
)
Keyword
.
fetch!
(
settings
,
:uploads
)
end
end
...
...
lib/pleroma/web/endpoint.ex
View file @
45627dde
...
@@ -11,7 +11,7 @@ defmodule Pleroma.Web.Endpoint do
...
@@ -11,7 +11,7 @@ defmodule Pleroma.Web.Endpoint do
#
#
# You should set gzip to true if you are running phoenix.digest
# You should set gzip to true if you are running phoenix.digest
# when deploying your static files in production.
# when deploying your static files in production.
plug
(
Plug
.
Static
,
at:
"/media"
,
from:
"uploads"
,
gzip:
false
)
plug
(
Plug
.
Static
,
at:
"/media"
,
from:
Pleroma
.
Upload
.
upload_path
()
,
gzip:
false
)
plug
(
plug
(
Plug
.
Static
,
Plug
.
Static
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment