2021-08-16 19:22:59 +01:00
<!DOCTYPE html>
< html lang = "en" >
< head >
2021-08-18 18:16:27 +01:00
< meta charset = "utf-8" >
2021-09-11 18:24:40 +01:00
< meta name = "viewport" content = "width=device-width, initial-scale=0.86, maximum-scale=5.0, minimum-scale=0.86" >
2021-08-18 18:16:27 +01:00
< link rel = "shortcut icon" href = "/favicon.ico" >
2021-09-11 18:24:40 +01:00
< link rel = "stylesheet" href = "https://www.gnusocial.rocks//assets/css/reset.css" >
< link rel = "stylesheet" href = "https://www.gnusocial.rocks//assets/css/blog.css" >
2021-09-13 13:15:59 +01:00
< link rel = 'stylesheet' type = 'text/css' href = "https://www.gnusocial.rocks//assets/fonts/opensans/opensans.css" > < title > Updates: Improve the Attachments system - GNU social V3< / title >
2021-08-16 19:22:59 +01:00
< / head > < body >
2021-08-18 18:16:27 +01:00
< header >
2021-08-18 15:04:03 +01:00
< div class = "home-menu menu menu-horizontal menu-fixed" >
2021-08-18 18:16:27 +01:00
< a class = "menu-heading" href = "https://gnusocial.rocks/" >
< img src = "../assets/img/gnu-social-logo-invert.svg" alt = "GNU social" >
< b > gnu< / b > social
< / a >
2021-08-18 15:04:03 +01:00
< / div >
< div class = "sidebar" >
2021-08-18 18:16:27 +01:00
< ul class = "menu-list" >
2021-08-19 15:37:16 +01:00
< li class = "menu-item menu-selected" > < a href = "index.html" class = "menu-link" > Blog Index< / a > < / li >
2021-08-18 18:16:27 +01:00
< li class = "menu-item" > < a href = "https://code.gnusocial.rocks/" class = "menu-link" > Repository< / a > < / li >
< li class = "menu-item" > < a href = "https://coverage.gnusocial.rocks/" class = "menu-link" > Code Coverage< / a > < / li >
< li class = "menu-item" > < a href = "https://docs.gnusocial.rocks/" class = "menu-link" > Documentation< / a > < / li >
< li class = "menu-item" > < a href = "https://agile.gnusocial.rocks/" class = "menu-link" > Wiki< / a > < / li >
< li class = "menu-item" > < a href = "https://kanban.undefinedhackers.net/?controller=BoardViewController&action=readonly&token=d2293e55cabae7cceff9fb496c651328195357d392b9e61a9f229ed6d463" class = "menu-link" > Roadmap< / a > < / li >
< / ul >
2021-08-18 15:04:03 +01:00
< / div >
2021-08-18 18:16:27 +01:00
< / header >
< div class = "content-wrapper" >
2021-08-18 15:04:03 +01:00
< div class = "content" >
2021-08-16 19:22:59 +01:00
< / div > < / div > < / div >
2021-08-18 18:16:27 +01:00
< div id = "template-wrapper" > < div class = "template-unit" >
2021-08-16 19:22:59 +01:00
<!-- entry begin -->
< h3 > < a class = "ablack" href = "updates-improve-the-attachments-system.html" >
Updates: Improve the Attachments system
< / a > < / h3 >
<!-- bashblog_timestamp: #202108051337.42# -->
< div class = "subtitle" > August 05, 2021 —
GNU social development team
< / div >
<!-- text begin -->
2021-08-19 03:20:52 +01:00
< p > With the milestone < a href = "https://www.gnusocial.rocks/v3/milestone-port-media-handling-from-v2.html" > Port Media system from
v2< / a > we had ported the existing
2021-08-16 19:22:59 +01:00
attachment system. The fact is that this system wasn't good enough.< / p >
< p > It's always important to start with the original code as that allows us
2021-08-19 03:20:52 +01:00
to review past decisions and understand all the corner cases previously
considered.< / p >
2021-08-16 19:22:59 +01:00
2021-08-19 03:20:52 +01:00
< p > Sadly, what motivated us to re-design the attachment system were the
non-considered corner cases. In particular:< / p >
< ul >
< li > Remove < code > title< / code > from attachment, as it's part of the relation between attachment and note.< / li >
< li > Remove < code > actor< / code > from attachment, many actors may publish the same attachment.< / li >
< li > Remove < code > is_local< / code > from attachment, as it's part of the relation between attachment and note.< / li >
< li > Remove < code > remote_url< / code > from attachment, different urls can return the same attachment.< / li >
< li > Attachment now has a reference counter < / li >
< li > Add entity GSActorToAttachment< / li >
< li > Add entity GSActorToRemoteURL< / li >
< li > Add entity RemoteURL< / li >
< li > Add entity RemoteURLToNote< / li >
< li > Add entity RemoteURLToAttachment< / li >
< li > AttachmentToNote now has a title attribute< / li >
< / ul >
2021-08-16 19:22:59 +01:00
< p > Key commits:< / p >
< ul >
< li > < a href = "https://code.undefinedhackers.net/GNUsocial/gnu-social/commit/32ad5dbd74ebb369c4b3ed688e1fb78464fabe49" > 32ad5dbd74 - [ENTITY] Split Attachment in various new entities< / a > < / li >
< li > < a href = "https://code.undefinedhackers.net/GNUsocial/gnu-social/commit/c381e58d3307e7dd07abeb9cf5b3998e34f5bd48" > c381e58d33 - [ENTITY] Refactor RemoteURL entities to Link< / a > < / li >
< / ul >
2021-08-19 03:20:52 +01:00
< p > The structural changes and how it compares to v2 is detailed in our
2021-08-16 19:22:59 +01:00
< a href = "http://agile.gnusocial.rocks/doku.php?id=attachment" > wiki< / a > .< / p >
< p > Some relevant observations:< / p >
< ul >
< li > < code > Link< / code > is now part of GNU social Data Representation terms. It represents
any remote URL being shared in a note.< / li >
< li > There's only one fixed directory for GSFiles.< / li >
< / ul >
2021-08-19 03:33:16 +01:00
2021-08-19 15:37:16 +01:00
2021-09-11 18:24:40 +01:00
2021-09-13 13:15:59 +01:00
2021-09-13 17:37:40 +01:00
2021-11-03 01:49:52 +00:00
2021-12-05 22:31:06 +00:00
2021-08-16 19:22:59 +01:00
<!-- text end -->
<!-- entry end -->
< / div >
< / div > < / div >
2021-09-13 13:15:59 +01:00
< footer class = "footer l-box is-center" >
This site's source is
< a href = "https://code.undefinedhackers.net/GNUsocial/gnusocial.rocks" > hosted here< / a > .
< / footer > < / body > < / html >