ActivityPubController: Update upload_media @doc

Small cherry-pick from https://git.pleroma.social/pleroma/pleroma/-/merge_requests/1810
This commit is contained in:
Haelwenn (lanodan) Monnier 2020-06-23 04:42:44 +02:00
parent d21ef5e66b
commit c116b6d6d6
No known key found for this signature in database
GPG Key ID: D5B7A8E43C997DEE

View File

@ -514,7 +514,6 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
{new_user, for_user}
end
# TODO: Add support for "object" field
@doc """
Endpoint based on <https://www.w3.org/wiki/SocialCG/ActivityPub/MediaUpload>
@ -525,6 +524,8 @@ defmodule Pleroma.Web.ActivityPub.ActivityPubController do
Response:
- HTTP Code: 201 Created
- HTTP Body: ActivityPub object to be inserted into another's `attachment` field
Note: Will not point to a URL with a `Location` header because no standalone Activity has been created.
"""
def upload_media(%{assigns: %{user: %User{} = user}} = conn, %{"file" => file} = data) do
with {:ok, object} <-