From: eal Date: Tue, 12 Dec 2017 19:03:28 +0000 (+0200) Subject: Allow uploading a file for follow import. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=d89193a8d77f67ad5f6ccc7897889c1ef2d030fa;p=akkoma Allow uploading a file for follow import. --- 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 @@ defmodule Pleroma.Web.TwitterAPI.UtilController 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()