Skip to content

Attachments zh TW

KoukeNeko edited this page Sep 9, 2026 · 3 revisions

Attachments

English · 繁體中文

taiga attachment list issue 42
taiga attachment add issue 42 ./error.log --description "Build failure"
cat error.log | taiga attachment add issue 42 - --name error.log
taiga attachment view issue 17
taiga attachment download issue 17 --output ./error.log
taiga attachment edit issue 17 --description "Resolved" --deprecated
taiga attachment delete issue 17 --yes

taiga attachment add epic 8 ./proposal.pdf
taiga attachment add wiki api-guide ./diagram.png

支援的資源

issue、story、task、epic 與 wiki。Wiki 用 slug 定位,其餘資源用 ref。

上傳

上傳採 streaming multipart,不會把整個檔案讀進記憶體。從 stdin 上傳時用 - 當路徑,並以 --name 指定檔名。

下載的完整性保證

attachment download 有幾項刻意的設計:

  • 不會把 API bearer token 送往 media URL。 附件的實際內容通常由物件儲存或反向代理提供, 把 API 憑證送過去沒有必要且有風險。
  • 邊下載邊計算 SHA-1 與 SHA-256,與 Taiga 記錄的 SHA-1 及檔案大小比對,不符即回報錯誤。
  • 先寫入權限 0600 的暫存檔,確認完整後才原子替換目的檔。
  • 預設不覆寫既有檔案。

非互動刪除必須提供 --yes。

Clone this wiki locally