diff options
author | href <href@random.sh> | 2018-11-06 19:34:57 +0100 |
---|---|---|
committer | href <href@random.sh> | 2018-11-06 19:41:15 +0100 |
commit | 5bb88fd1749931e755157760ec833c5d50ebb8c8 (patch) | |
tree | a43e1d2cb7812bd8df741203126e1ca12052c058 /lib/pleroma/uploaders/swift/swift.ex | |
parent | 25512aa29cae22b73ee45a22954693c1a130ea3e (diff) | |
download | pleroma-5bb88fd1749931e755157760ec833c5d50ebb8c8.tar.gz |
Runtime configuration
Related to #85
Everything should now be configured at runtime, with the exception of
the `Pleroma.HTML` scrubbers (the scrubbers used can be
changed at runtime, but their configuration is compile-time) because
it's building a module with a macro.
Diffstat (limited to 'lib/pleroma/uploaders/swift/swift.ex')
-rw-r--r-- | lib/pleroma/uploaders/swift/swift.ex | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pleroma/uploaders/swift/swift.ex b/lib/pleroma/uploaders/swift/swift.ex index 819dfebda..fa08ca966 100644 --- a/lib/pleroma/uploaders/swift/swift.ex +++ b/lib/pleroma/uploaders/swift/swift.ex @@ -1,17 +1,15 @@ defmodule Pleroma.Uploaders.Swift.Client do use HTTPoison.Base - @settings Application.get_env(:pleroma, Pleroma.Uploaders.Swift) - def process_url(url) do Enum.join( - [Keyword.fetch!(@settings, :storage_url), url], + [Pleroma.Config.get!([Pleroma.Uploaders.Swift, :storage_url]), url], "/" ) end def upload_file(filename, body, content_type) do - object_url = Keyword.fetch!(@settings, :object_url) + object_url = Pleroma.Config.get!([Pleroma.Uploaders.Swift, :object_url]) token = Pleroma.Uploaders.Swift.Keystone.get_token() case put("#{filename}", body, "X-Auth-Token": token, "Content-Type": content_type) do |