Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Garbage collection for unreferenced attachments

オープン
#1,999 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
javascript, markdown
領域
backend

調査の方向性

まず issues #1623 と #1633 のコンテキスト、および既存の DELETE attachment endpoint を読みます。この issue ではクリーンアップのトリガー候補がいくつか示されていますが、1 つは選ばれていません。まず、sync のパフォーマンスを損なわずに note Markdown を解析するための妥当なアプローチを決定し、note フォルダーの外側にある相対パスの扱いを定義してください。合意されたクリーンアップ戦略が実装され、そのエッジケースに対処できれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
738
フォーク
162
平均マージ
2時間 42分
マージ済み PR(30日)
39

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextcloud/notes のほかの issue

nextcloud/notes の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。