From d89193a8d77f67ad5f6ccc7897889c1ef2d030fa Mon Sep 17 00:00:00 2001 From: eal Date: Tue, 12 Dec 2017 21:03:28 +0200 Subject: [PATCH] Allow uploading a file for follow import. --- lib/pleroma/web/twitter_api/controllers/util_controller.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex index c76486392..8eeaa0064 100644 --- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex @@ -74,6 +74,9 @@ def emoji(conn, _params) do json conn, Enum.into(Formatter.get_custom_emoji(), %{}) end + def follow_import(conn, %{"list" => %Plug.Upload{} = listfile}) do + follow_import(conn, %{"list" => File.read!(listfile.path)}) + end def follow_import(%{assigns: %{user: user}} = conn, %{"list" => list}) do errors = list |> String.split()