Materials
Every file you upload to TongFlow — image, video, audio, document, 3D model — is a material. Materials are stored locally on the machine running the studio and re-usable across workflows from the Portfolio dialog.
Where the materials library lives
Open the left sidebar (top-left corner of the workspace). The third icon — FolderOpen — opens the Portfolio dialog. That’s the materials library.
[Workflow] [Tasks (⚡)] [Portfolio (📁)] ← three buttons, left-to-rightThe Portfolio dialog is not on the Smart Island. The Smart Island handles adding new nodes and running workflows; the Portfolio handles the file library.
What you can upload
| Material kind | Accepted formats (typical) |
|---|---|
| Image | JPEG, PNG, WebP, GIF (still), HEIC |
| Audio | MP3, WAV, M4A, AAC, FLAC, OGG |
| Video | MP4, MOV, WebM, MKV |
| Document | PDF, DOCX, TXT, MD, and other text-extractable formats |
| 3D model | GLB, GLTF (and other formats your viewer supports) |
The exact accepted list comes from the input picker of each add-node; check the file picker dialog inside an add node for the current type filter.
How files are stored
- Files live on local disk under
data/uploads/. - Their metadata (filename, size, modality, MIME type) is in
data/tongflow.dbunder the materials table. - There’s no central CDN. If you want to serve materials from a CDN later, set
NEXT_PUBLIC_FILE_BASE_URLin.envto point at it.
Adding a material
You can add a material in two ways:
From inside an add node (most common)
- Drop an add node onto the canvas via the Smart Island (e.g. the Image icon).
- The node renders an in-place picker — click it, choose a file, and the material is uploaded.
- The material is now both bound to that node and registered in the Portfolio for later re-use.
For audio/video, the add node also offers camera/mic recording in place of file picking.
From the Portfolio dialog
- Open Portfolio (left sidebar FolderOpen).
- Click Upload and pick one or more files.
- The materials register without being attached to a specific node — you can drag them onto the canvas later.
Re-using a material across workflows
Materials are global to your install, not scoped to a workflow. To re-use:
- Open the Portfolio dialog.
- Find the material (filter by modality if needed).
- Drag it from the Portfolio into the canvas, or open an add-node’s picker and select “From Portfolio”.
The material itself isn’t duplicated on disk — the new node references the same file.
Removing a material
In the Portfolio dialog, hover a material and click delete. The file is removed from data/uploads/ and its database row dropped. Any node that referenced it will show a broken-link state until you rebind.
How TongFlow handles material in transforms
When a transform runs on Modal, the material is uploaded once per task and processed there. Outputs come back to your machine and land back in data/uploads/. Nothing about the file is retained by Modal beyond what their own retention policy says.
Related
- Smart Island — adding nodes (not where materials live)
- Node types — which transforms accept which material kinds
- Getting started — env vars including
NEXT_PUBLIC_FILE_BASE_URL
