Merge branch 'fix/chats-no-unread-in-openapi' into 'develop'
[akkoma] / lib / pleroma / web / mastodon_api / controllers / media_controller.ex
index 9586b14bc37c906d266e0c58fd41036a64ad5018..d6949ed8075c0d1cc1df27dfdcb31a3407cfc678 100644 (file)
@@ -1,5 +1,5 @@
 # Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
 defmodule Pleroma.Web.MastodonAPI.MediaController do
@@ -11,6 +11,7 @@ defmodule Pleroma.Web.MastodonAPI.MediaController do
   alias Pleroma.Web.Plugs.OAuthScopesPlug
 
   action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
+  plug(Majic.Plug, [pool: Pleroma.MajicPool] when action in [:create, :create2])
   plug(Pleroma.Web.ApiSpec.CastAndValidate)
   plug(:put_view, Pleroma.Web.MastodonAPI.StatusView)