logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 3875a507d4b52df7edbda376d3ed31ad52241ac5
parent: d21ef5e66bd0d7601b06dc7e59f3ee0fcd9e04bb
Author: Haelwenn <contact+git.pleroma.social@hacktivis.me>
Date:   Tue, 23 Jun 2020 03:04:27 +0000

Merge branch '@doc/apc2s-upload-media' into 'develop'

ActivityPubController: Update upload_media @doc

See merge request pleroma/pleroma!2673

Diffstat:

Mlib/pleroma/web/activity_pub/activity_pub_controller.ex3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/pleroma/web/activity_pub/activity_pub_controller.ex b/lib/pleroma/web/activity_pub/activity_pub_controller.ex @@ -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} <-