format
authorhakabahitoyo <hakabahitoyo@example.com>
Thu, 15 Nov 2018 06:11:59 +0000 (15:11 +0900)
committerhakabahitoyo <hakabahitoyo@example.com>
Thu, 15 Nov 2018 06:11:59 +0000 (15:11 +0900)
config/config.exs
lib/pleroma/uploaders/mdii.ex

index ef69368e64f625637af3e4675a3b7be68ba735a8..f222c1aa4dd0093d8f536be1790199b85feaaef2 100644 (file)
@@ -23,8 +23,7 @@ config :pleroma, Pleroma.Uploaders.S3,
   public_endpoint: "https://s3.amazonaws.com",
   force_media_proxy: false
 
-config :pleroma, Pleroma.Uploaders.Mdii,
-  host_name: "mdii.sakura.ne.jp"
+config :pleroma, Pleroma.Uploaders.Mdii, host_name: "mdii.sakura.ne.jp"
 
 config :pleroma, :emoji, shortcode_globs: ["/emoji/custom/**/*.png"]
 
index 0f68b08056bf3c4753fcb73264458102a1a93f34..c5deaf73f744638d2ddff71a50678a672f4f5790 100644 (file)
@@ -10,12 +10,11 @@ defmodule Pleroma.Uploaders.Mdii do
     {:ok, file_data} = File.read(path)
 
     File.rm!(path)
-    
+
     extension = Regex.replace(~r/^image\//, content_type, "")
     query = "https://#{host_name}/mdii.cgi?#{extension}"
 
-    with {:ok, %{status_code: 200, body: body}} <-
-           @httpoison.post(query, file_data) do
+    with {:ok, %{status_code: 200, body: body}} <- @httpoison.post(query, file_data) do
       remote_file_name = body
       public_url = "https://#{host_name}/#{remote_file_name}.#{extension}"
       {:ok, public_url}