Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. Drafting a [proposal][1] to add API support in #Fedify for the [ActivityPub Media Upload extension][2], the SocialCG-incubated #C2S companion that lets clients upload media via a dedicated `endpoints

Drafting a [proposal][1] to add API support in #Fedify for the [ActivityPub Media Upload extension][2], the SocialCG-incubated #C2S companion that lets clients upload media via a dedicated `endpoints

Scheduled Pinned Locked Moved Uncategorized
c2sfedifyfedidevfediverseactivitypub
23 Posts 6 Posters 74 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mariusor@metalhead.clubM mariusor@metalhead.club

    @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.

    hongminhee@hollo.socialH This user is from outside of this forum
    hongminhee@hollo.socialH This user is from outside of this forum
    hongminhee@hollo.social
    wrote last edited by
    #3

    @mariusor@metalhead.club I agree. We probably need a FEP for this?

    mariusor@metalhead.clubM 1 Reply Last reply
    0
    • mariusor@metalhead.clubM mariusor@metalhead.club

      @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.

      kopper@not-brain.d.on-t.workK This user is from outside of this forum
      kopper@not-brain.d.on-t.workK This user is from outside of this forum
      kopper@not-brain.d.on-t.work
      wrote last edited by
      #4
      @mariusor @hongminhee you don't even need a "token" concept specifically, the media upload could internally as:Create an as:Document (but not broadcast it) you can then refer to or inline as needed
      mariusor@metalhead.clubM 1 Reply Last reply
      0
      • hongminhee@hollo.socialH hongminhee@hollo.social

        @mariusor@metalhead.club I agree. We probably need a FEP for this?

        mariusor@metalhead.clubM This user is from outside of this forum
        mariusor@metalhead.clubM This user is from outside of this forum
        mariusor@metalhead.club
        wrote last edited by
        #5

        @hongminhee I haven't reached that point in GoActivityPub development to really think about it.

        Currently for binary uploads I use world's hackiest hack™️, where I encode the media as a base64 media URI and set it as the Content of a Image/Audio/Video object that I send through client to server.

        So far this has worked well enough between the clients and servers *I* developed, but I can't really ask anyone else to support that.

        tychi@merveilles.townT 1 Reply Last reply
        0
        • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
          @mariusor @hongminhee you don't even need a "token" concept specifically, the media upload could internally as:Create an as:Document (but not broadcast it) you can then refer to or inline as needed
          mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.clubM This user is from outside of this forum
          mariusor@metalhead.club
          wrote last edited by
          #6

          @kopper token can be anything: an URL at which the media can now be found, the "template" json document Evan was talking about with the URL filled in, etc... Whatever would make the most sense I guess.

          @hongminhee

          kopper@not-brain.d.on-t.workK mariusor@metalhead.clubM 2 Replies Last reply
          0
          • mariusor@metalhead.clubM mariusor@metalhead.club

            @kopper token can be anything: an URL at which the media can now be found, the "template" json document Evan was talking about with the URL filled in, etc... Whatever would make the most sense I guess.

            @hongminhee

            kopper@not-brain.d.on-t.workK This user is from outside of this forum
            kopper@not-brain.d.on-t.workK This user is from outside of this forum
            kopper@not-brain.d.on-t.work
            wrote last edited by
            #7
            @mariusor @hongminhee URLs to AS objects makes the most sense to me, as you can Just (assuming valid JSON-LD handling across the ecosystem) paste the link into whatever property to federate it immediately without needing to load more data

            and the media uploader can do things like introspect width/height/blurhash out of the uploaded file into the document itself, instead of moving that logic to the client (although I imagine it'd be a good idea to allow the client to as:Update the resulting documents to add more metadata if it has to)
            kopper@not-brain.d.on-t.workK 1 Reply Last reply
            0
            • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
              @mariusor @hongminhee URLs to AS objects makes the most sense to me, as you can Just (assuming valid JSON-LD handling across the ecosystem) paste the link into whatever property to federate it immediately without needing to load more data

              and the media uploader can do things like introspect width/height/blurhash out of the uploaded file into the document itself, instead of moving that logic to the client (although I imagine it'd be a good idea to allow the client to as:Update the resulting documents to add more metadata if it has to)
              kopper@not-brain.d.on-t.workK This user is from outside of this forum
              kopper@not-brain.d.on-t.workK This user is from outside of this forum
              kopper@not-brain.d.on-t.work
              wrote last edited by
              #8
              @hongminhee @mariusor although "URL to media blob directly" is simpler to implement and has more flexibility in cases where you're gonna be using that media outside well-formed AS (say: inline media in HTML)
              mariusor@metalhead.clubM trwnh@mastodon.socialT 2 Replies Last reply
              0
              • mariusor@metalhead.clubM mariusor@metalhead.club

                @kopper token can be anything: an URL at which the media can now be found, the "template" json document Evan was talking about with the URL filled in, etc... Whatever would make the most sense I guess.

                @hongminhee

                mariusor@metalhead.clubM This user is from outside of this forum
                mariusor@metalhead.clubM This user is from outside of this forum
                mariusor@metalhead.club
                wrote last edited by
                #9

                @kopper now that I had to think about it for 10m, I really like the idea of getting back a templated object that can further be amended by the client and sent in a Create.

                *By templated I mean an "incomplete" object which has filled only the properties that make sense: ID, URL, MediaType, Type, AttributedTo,etc...

                @hongminhee

                kopper@not-brain.d.on-t.workK 1 Reply Last reply
                0
                • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
                  @hongminhee @mariusor although "URL to media blob directly" is simpler to implement and has more flexibility in cases where you're gonna be using that media outside well-formed AS (say: inline media in HTML)
                  mariusor@metalhead.clubM This user is from outside of this forum
                  mariusor@metalhead.clubM This user is from outside of this forum
                  mariusor@metalhead.club
                  wrote last edited by
                  #10

                  @kopper for me ActivityPub servers are just ActivityPub servers, there's no using that media outside ActivityPub. There is only one GOD. 🙏

                  @hongminhee

                  kopper@not-brain.d.on-t.workK 1 Reply Last reply
                  0
                  • mariusor@metalhead.clubM mariusor@metalhead.club

                    @kopper now that I had to think about it for 10m, I really like the idea of getting back a templated object that can further be amended by the client and sent in a Create.

                    *By templated I mean an "incomplete" object which has filled only the properties that make sense: ID, URL, MediaType, Type, AttributedTo,etc...

                    @hongminhee

                    kopper@not-brain.d.on-t.workK This user is from outside of this forum
                    kopper@not-brain.d.on-t.workK This user is from outside of this forum
                    kopper@not-brain.d.on-t.work
                    wrote last edited by
                    #11
                    @mariusor @hongminhee this makes a lot of sense assuming the client would want to edit the object often, but I'm a little worried about the case where you upload a file and not as:Create the object afterwards (accidentally, obviously. e.g. network loss). feels a little fragile although I can see how you may still want to deal with that case even if the server Created the object itself (but it never got referenced anywhere)
                    1 Reply Last reply
                    0
                    • mariusor@metalhead.clubM mariusor@metalhead.club

                      @kopper for me ActivityPub servers are just ActivityPub servers, there's no using that media outside ActivityPub. There is only one GOD. 🙏

                      @hongminhee

                      kopper@not-brain.d.on-t.workK This user is from outside of this forum
                      kopper@not-brain.d.on-t.workK This user is from outside of this forum
                      kopper@not-brain.d.on-t.work
                      wrote last edited by
                      #12
                      @mariusor @hongminhee as:content is HTML and a lot of servers (including mine) do let you attach inline media in there
                      1 Reply Last reply
                      0
                      • kopper@not-brain.d.on-t.workK kopper@not-brain.d.on-t.work
                        @hongminhee @mariusor although "URL to media blob directly" is simpler to implement and has more flexibility in cases where you're gonna be using that media outside well-formed AS (say: inline media in HTML)
                        trwnh@mastodon.socialT This user is from outside of this forum
                        trwnh@mastodon.socialT This user is from outside of this forum
                        trwnh@mastodon.social
                        wrote last edited by
                        #13

                        @kopper @hongminhee i think you could upload the binary media to one endpoint, get an https: url for its Location header, and turn around and Create an Image or whatever with that Location header as the url.href of your new Image

                        although now that this topic comes up: there is a lack of clarity around "image" vs "image representation", since Image assumes "image" and not "image representation". as:url is nominally that "representation" and i wish it was better defined that this was the case...

                        1 Reply Last reply
                        0
                        • mariusor@metalhead.clubM mariusor@metalhead.club

                          @hongminhee I haven't reached that point in GoActivityPub development to really think about it.

                          Currently for binary uploads I use world's hackiest hack™️, where I encode the media as a base64 media URI and set it as the Content of a Image/Audio/Video object that I send through client to server.

                          So far this has worked well enough between the clients and servers *I* developed, but I can't really ask anyone else to support that.

                          tychi@merveilles.townT This user is from outside of this forum
                          tychi@merveilles.townT This user is from outside of this forum
                          tychi@merveilles.town
                          wrote last edited by
                          #14

                          @mariusor @hongminhee

                          I’m not developing against ap specifically but do keep tabs

                          I think the two part process makes sense and that’s how I’m approaching my ap adjacent media explorations

                          The core is the idea of an array of posts, where each post could be a different media type, and so I upload media first and once I have what we can call a permalink, I put that in the actual post to create the reference from the top level post to embed the media

                          My biggest annoyance as someone that really enjoys media production, is how bad media is across the fediverse.

                          I’m a firm believer that how bad these tools are for people like me is why this place doesn’t grow beyond people that can stomach primarily text based relationships.

                          tychi@merveilles.townT mariusor@metalhead.clubM 3 Replies Last reply
                          0
                          • tychi@merveilles.townT tychi@merveilles.town

                            @mariusor @hongminhee

                            I’m not developing against ap specifically but do keep tabs

                            I think the two part process makes sense and that’s how I’m approaching my ap adjacent media explorations

                            The core is the idea of an array of posts, where each post could be a different media type, and so I upload media first and once I have what we can call a permalink, I put that in the actual post to create the reference from the top level post to embed the media

                            My biggest annoyance as someone that really enjoys media production, is how bad media is across the fediverse.

                            I’m a firm believer that how bad these tools are for people like me is why this place doesn’t grow beyond people that can stomach primarily text based relationships.

                            tychi@merveilles.townT This user is from outside of this forum
                            tychi@merveilles.townT This user is from outside of this forum
                            tychi@merveilles.town
                            wrote last edited by
                            #15

                            @mariusor @hongminhee fwiw my entire architecture is a c2s so I’m very excited to be compatible with a flourishing c2s ap future

                            A single central personal server makes so much sense to me and I’ve really enjoyed what I’m doing even if I’m only a personal computer and a party of 1

                            1 Reply Last reply
                            0
                            • tychi@merveilles.townT tychi@merveilles.town

                              @mariusor @hongminhee

                              I’m not developing against ap specifically but do keep tabs

                              I think the two part process makes sense and that’s how I’m approaching my ap adjacent media explorations

                              The core is the idea of an array of posts, where each post could be a different media type, and so I upload media first and once I have what we can call a permalink, I put that in the actual post to create the reference from the top level post to embed the media

                              My biggest annoyance as someone that really enjoys media production, is how bad media is across the fediverse.

                              I’m a firm believer that how bad these tools are for people like me is why this place doesn’t grow beyond people that can stomach primarily text based relationships.

                              mariusor@metalhead.clubM This user is from outside of this forum
                              mariusor@metalhead.clubM This user is from outside of this forum
                              mariusor@metalhead.club
                              wrote last edited by
                              #16

                              @tychi that sounds a lot a like of what I'm doing with my BOX client to server client and ONI ActivityPub server.

                              https://git.sr.ht/~mariusor/box
                              https://git.sr.ht/~mariusor/oni

                              @hongminhee

                              tychi@merveilles.townT 1 Reply Last reply
                              1
                              0
                              • R relay@relay.mycrowd.ca shared this topic
                              • tychi@merveilles.townT tychi@merveilles.town

                                @mariusor @hongminhee

                                I’m not developing against ap specifically but do keep tabs

                                I think the two part process makes sense and that’s how I’m approaching my ap adjacent media explorations

                                The core is the idea of an array of posts, where each post could be a different media type, and so I upload media first and once I have what we can call a permalink, I put that in the actual post to create the reference from the top level post to embed the media

                                My biggest annoyance as someone that really enjoys media production, is how bad media is across the fediverse.

                                I’m a firm believer that how bad these tools are for people like me is why this place doesn’t grow beyond people that can stomach primarily text based relationships.

                                mariusor@metalhead.clubM This user is from outside of this forum
                                mariusor@metalhead.clubM This user is from outside of this forum
                                mariusor@metalhead.club
                                wrote last edited by
                                #17

                                @tychi also I submitted my proposal alongside Reiver's submission: https://github.com/w3c/activitypub/issues/578#issuecomment-4366469692

                                @hongminhee

                                1 Reply Last reply
                                0
                                • mariusor@metalhead.clubM mariusor@metalhead.club

                                  @tychi that sounds a lot a like of what I'm doing with my BOX client to server client and ONI ActivityPub server.

                                  https://git.sr.ht/~mariusor/box
                                  https://git.sr.ht/~mariusor/oni

                                  @hongminhee

                                  tychi@merveilles.townT This user is from outside of this forum
                                  tychi@merveilles.townT This user is from outside of this forum
                                  tychi@merveilles.town
                                  wrote last edited by
                                  #18

                                  @mariusor @hongminhee super cool, yeah we’re definitely tracking in similar veins in adjacent spaces

                                  The core of my c2s philosophy is a small js lib I use for custom elements because I do think react, vue, svelte, angular, htmx, lit are all too complicated for 90% of things.

                                  It’d be actually pretty easy for me to embed my whole os just as oni client assets, just some js.

                                  AFK for a couple weeks but I’m sure I’ll clone and poke sometime this summer. I’ll share back when I do

                                  1 Reply Last reply
                                  0
                                  • evan@cosocial.caE This user is from outside of this forum
                                    evan@cosocial.caE This user is from outside of this forum
                                    evan@cosocial.ca
                                    wrote last edited by
                                    #19

                                    @hongminhee 대박!

                                    1 Reply Last reply
                                    1
                                    0
                                    • mariusor@metalhead.clubM mariusor@metalhead.club

                                      @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.

                                      evan@cosocial.caE This user is from outside of this forum
                                      evan@cosocial.caE This user is from outside of this forum
                                      evan@cosocial.ca
                                      wrote last edited by
                                      #20

                                      @mariusor @hongminhee

                                      I hope you write that out! But people should implement the API we have now.

                                      mariusor@metalhead.clubM 1 Reply Last reply
                                      1
                                      0
                                      • evan@cosocial.caE evan@cosocial.ca

                                        @mariusor @hongminhee

                                        I hope you write that out! But people should implement the API we have now.

                                        mariusor@metalhead.clubM This user is from outside of this forum
                                        mariusor@metalhead.clubM This user is from outside of this forum
                                        mariusor@metalhead.club
                                        wrote last edited by
                                        #21

                                        @evan I did on reiver's comment on github: https://github.com/w3c/activitypub/issues/578#issuecomment-4366469692

                                        It's a compromise between the current SocialCG proposal, and what I said above.

                                        Do you think it warrants it's own ticket?

                                        @hongminhee

                                        evan@cosocial.caE 1 Reply Last reply
                                        0
                                        • mariusor@metalhead.clubM mariusor@metalhead.club

                                          @evan I did on reiver's comment on github: https://github.com/w3c/activitypub/issues/578#issuecomment-4366469692

                                          It's a compromise between the current SocialCG proposal, and what I said above.

                                          Do you think it warrants it's own ticket?

                                          @hongminhee

                                          evan@cosocial.caE This user is from outside of this forum
                                          evan@cosocial.caE This user is from outside of this forum
                                          evan@cosocial.ca
                                          wrote last edited by
                                          #22

                                          @mariusor @hongminhee yes, it should be a separate ticket.

                                          I don't like your proposal for multiple reasons:

                                          1) It doesn't include addressing, so the upload server doesn't know how to enforce authorization requests. Is the file for followers? Only addressed accounts? The public?

                                          2) What happens if the client doesn't post the `Create` activity?

                                          I think it's better to keep it all in one transaction together.

                                          mariusor@metalhead.clubM 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups