Expand description
The files a Kanban task carries, on disk (docs/specs/SPEC_KANBAN_TASK_MEDIA_2026_10_25.md §3.2, §3.3).
<shared>/task-media/ab/<sha256>.<ext> the file, named by its content
<shared>/task-media/ab/<sha256>.thumb.png a 256 px thumbnail of an image
<shared>/task-media/incoming/<uuid>.part an upload in flightIt is in the shared home, not a channel’s data dir, because the tasks are shared by every channel.
It is not the attachments store: that store sweeps files by last use, and a picture the operator
has not looked at yet must stay. What a task carries is in storage/work_media.rs.
Structs§
- Sniff
- What a file is, by its content.
Constants§
- MAX_
FILES_ PER_ CALL - The most files in one call.
- MAX_
IMAGE_ BYTES - The largest image and recording.
- MAX_
RECORDING_ BYTES
Functions§
- blob_
path - Where the file with this content is (or would be).
Nonefor a hash that isn’t one: it can never carry a separator into a path. - commit
- Move an upload to the place its content names, unless the same content is already there. An image also gets its thumbnail (a failure to make one is not the upload’s: the card falls back to the file).
- default_
root - The folder this srv uses, in step with its work store (see
root_beside). - ext_
of_ mime - The extension a stored file of this MIME type has.
- max_
bytes - The largest a file of this kind can be.
- new_
incoming_ path - A new path for an upload in flight.
- read_
head - Read the first bytes of a file, enough to sniff it.
- remove_
content - Remove the file with this content and its thumbnail. Returns whether a file went.
- root_
beside - Where the folder is, given where the work store is: beside a work store this channel has to itself (a
task devbuild’s), else in the shared home with the store every channel shares. The sweep deletes what its own store does not name, so two stores must never share one folder. - sniff
- What the first bytes of a file say it is, if it is one the Kanban accepts: PNG, JPEG, GIF, WebP, SVG, MP4, MOV, WebM. Never by the name.
- sweep
- Clear what is left behind: uploads that never finished, and stored files no task names (
namedsays whether one does) once they are an hour old, so an upload waiting to be attached is not lost. Returns how many files went. - thumb_
path - Where an image’s thumbnail is (or would be).