Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Garbage collection for unreferenced attachments

Aperta
#1,999 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

feature request needs discussion

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

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextcloud/notes

Tutte le issue di nextcloud/notes

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.