@hongminhee@hollo.social

Drafting a proposal to add API support in for the ActivityPub Media Upload extension, the SocialCG-incubated companion that lets clients upload media via a dedicated endpoints.uploadMedia endpoint, separate from the outbox.

The sketched API mirrors the outbox listeners shipped in Fedify 2.2: setMediaUploader(path, callback) paired with .authorize(). Return a vocab.Object for 201 Created, or a URL for 202 Accepted.

This is still an early design draft. Feedback on the shape, semantics, and edge cases is very welcome:

https://github.com/fedify-dev/fedify/issues/754

github.com

Support ActivityPub Media Upload extension via `setMediaUploader()` · Issue #754 · fedify-dev/fedify

Summary Add support for the ActivityPub Media Upload extension so that Fedify-based servers can accept C2S media uploads from clients. The proposed API mirrors the C2S outbox listeners introduced i...

1 reply

@mariusor@metalhead.club · Reply to 洪 民憙 (Hong Minhee) :nonbinary:

@hongminhee like I mentioned in a thread where Evan and Reiver were talking about this, I think having a mediaUpload that has a very similar behaviour to an inbox/outbox, but with one **small** changed detail is a bad API.

I would prefer there's either a two step process: upload media first, use resulting token in an object create, or use the outbox with for the binary data upload directly... The first one seems saner to me.