From 5d4dae70da3fb130868724bb91ab000eda2ce4bf Mon Sep 17 00:00:00 2001
From: Diogo Peralta Cordeiro GNU social V3
+
Not talking neither about ImageEncoder nor VideoEncoder this time, but rather +about StoreRemoteMedia and Embed.
+ +StoreRemoteMedia
+fetches remote files when they are Linked in a note. I.e., when the major mimetype isn't text
.
+It usually fetches and attempts to generate a thumb, if there are no encoders, it drops.
Embed
+attempts to generate a page preview from opengraph and oembed. I.e., acts when the major mimetype is text
.
We've changed so much with GNU social v3 that, regarding SRM there was +no possible port, just a full rewrite. The code of both plugins became +much easier of understanding and compact, while promoting the same +functionality with more stability.
+ + + + + +]]>https://gnusocial.rocks/v3/updates-implement-storeremotemedia-for-v3-and-port-embed.html +It's always important to start with the original code as that allows us +to review past decisions and understand all the corner cases.
+ +Sadly, what motivated us to re-design the attachment system was the +non-considered corner cases.
+ +Key commits:
+ +The reasoning leading to these entities and structure is detailed in our +wiki.
+ +Some relevant observations:
+ +Link
is now part of GNU social Data Representation terms. It represents
+any remote URL being shared in a note.Its controller handles upload, update and removal.
+ +Important change from v2: Avatars are now regular attachments.
+ + + + + +]]>GNU social now has its documentation available in +https://docs.gnusocial.rocks/. It features four +different books. It is automatically generated from the source using mdBook.
+ +Only the development book is in an elaborated state, the other books are +holding for more ready code.
+ +Two of them are updates from existing documentation:
+ +And two of them are new:
+ +Together with the documentation we've introduced a +wiki. Its purpose is to walk-through decisions, +convention, terminology. It's where we document the reasoning the dev team went +through before implementing more sophisticated functionalities.
+ +Finally, when the documentation doesn't explain, and to ensure the whole code +is properly tested, we have the +tests. And the coverage is available here.
+ + + + + +]]>File Storage in GNU social is used for avatars, for notes containing +attachments, and for notes containing links (in which case is an Embed preview). +Notes can be created by local users or fetched from remote actors. Filehash is +used to reduce file duplication.
+ +When a user shares a Link that uses OpenGraph tags or has an OEmbed provider, +the Embed plugin generates a preview for it that may contain a thumbnail.
+ +When a user shares a Link to an image, the StoreRemoteMedia plugin can fetch the +file and make it available as an attachment, and will generate a thumbnail.
+ +When an image, video, or other file type is uploaded or retrieved, an Attachment +entity is created. When a thumbnail is requested, one is generated.
+ +There are three relevant plugins for attachment handling:
+ +There are various entities related to attachment, and thumbnail handling. +The main ones are:
+ + + +The plugins are able to act by means of the Events system, as elaborated in the +documentation.
+ + + + + + +]]>We are being supported by NLnet.
+GNU social now has its documentation available in +https://docs.gnusocial.rocks/. It features four +different books. It is automatically generated from the source using mdBook.
+ +Only the development book is in an elaborated state, the other books are +holding for more ready code.
+ +Two of them are updates from existing documentation:
+ +And two of them are new:
+ +Together with the documentation we've introduced a +wiki. Its purpose is to walk-through decisions, +convention, terminology. It's where we document the reasoning the dev team went +through before implementing more sophisticated functionalities.
+ +Finally, when the documentation doesn't explain, and to ensure the whole code +is properly tested, we have the +tests. And the coverage is available here.
+ + + + + + +File Storage in GNU social is used for avatars, for notes containing +attachments, and for notes containing links (in which case is an Embed preview). +Notes can be created by local users or fetched from remote actors. Filehash is +used to reduce file duplication.
+ +When a user shares a Link that uses OpenGraph tags or has an OEmbed provider, +the Embed plugin generates a preview for it that may contain a thumbnail.
+ +When a user shares a Link to an image, the StoreRemoteMedia plugin can fetch the +file and make it available as an attachment, and will generate a thumbnail.
+ +When an image, video, or other file type is uploaded or retrieved, an Attachment +entity is created. When a thumbnail is requested, one is generated.
+ +There are three relevant plugins for attachment handling:
+ +There are various entities related to attachment, and thumbnail handling. +The main ones are:
+ + + +The plugins are able to act by means of the Events system, as elaborated in the +documentation.
+ + + + + + + +Its controller handles upload, update and removal.
+ +Important change from v2: Avatars are now regular attachments.
+ + + + + + +GNU social comes with two plugins that add important media functionality.
+ +Not talking neither about ImageEncoder nor VideoEncoder this time, but rather +about StoreRemoteMedia and Embed.
+ +StoreRemoteMedia
+fetches remote files when they are Linked in a note. I.e., when the major mimetype isn't text
.
+It usually fetches and attempts to generate a thumb, if there are no encoders, it drops.
Embed
+attempts to generate a page preview from opengraph and oembed. I.e., acts when the major mimetype is text
.
We've changed so much with GNU social v3 that, regarding SRM there was +no possible port, just a full rewrite. The code of both plugins became +much easier of understanding and compact, while promoting the same +functionality with more stability.
+ + + + + + +With the milestone "Port Media system from v2" we had ported the existing +attachment system. The fact is that this system wasn't good enough.
+ +It's always important to start with the original code as that allows us +to review past decisions and understand all the corner cases.
+ +Sadly, what motivated us to re-design the attachment system was the +non-considered corner cases.
+ +Key commits:
+ +The reasoning leading to these entities and structure is detailed in our +wiki.
+ +Some relevant observations:
+ +Link
is now part of GNU social Data Representation terms. It represents
+any remote URL being shared in a note.