Garbage collection for unreferenced attachments
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 30/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- javascript, markdown
- Ambito
- backend
Direzione di ricerca
Inizia leggendo il contesto delle issue #1623 e #1633 e dell’endpoint DELETE attachment esistente. La issue presenta diversi possibili trigger per la pulizia, ma non ne sceglie uno; determina prima un approccio accettabile per analizzare il Markdown delle note senza compromettere le prestazioni di sync e definisci la gestione dei percorsi relativi al di fuori della cartella della nota. Il lavoro è completo quando esiste una strategia di pulizia concordata e implementata, con i relativi casi limite gestiti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Follow up to #1623 and #1633.
Since #1633, API attachments live in a note's own .attachments. folder. The whole folder is removed when the note is deleted, and a single file can be removed through the new DELETE attachment endpoint. What is still missing is cleanup of attachments that are no longer referenced in a note's text.
When a user edits a note and removes an image or a link, the underlying file stays in .attachments. indefinitely, so orphaned files build up that nobody can reach from the note.
This was left out because finding unused attachments means parsing each note's Markdown to collect the referenced paths, which is the server side parsing we have tried to avoid for sync performance. So it needs a deliberate approach.
Options to consider:
- On note save, parse the referenced paths and delete any file in that note's .attachments. folder that is no longer referenced.
- A separate background or on demand job that does the same sweep across all notes.
Leave deletion to clients through the DELETE endpoint and keep nothing automatic.
Open questions: which trigger is acceptable given the sync performance concern, and how to treat attachments referenced by relative paths that point outside the note's own folder.
- Lingua principale
- JavaScript
- Stelle
- 738
- Fork
- 162
- Merge medio
- 2h 42m
- PR unite (30g)
- 39
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextcloud/notes
-
bug need to reproduce
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
bug need to reproduce
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
feature request needs discussion
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di nextcloud/notes
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
Mintplex-Labs/anything-llm#6490 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
[quality] workflow-scripts guard reads test:unit:coverage as skipping the unit suite, blocking #632 Apertaagent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
area-clientside-dartpad
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100