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-right

The 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 kindAccepted formats (typical)
ImageJPEG, PNG, WebP, GIF (still), HEIC
AudioMP3, WAV, M4A, AAC, FLAC, OGG
VideoMP4, MOV, WebM, MKV
DocumentPDF, DOCX, TXT, MD, and other text-extractable formats
3D modelGLB, 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.db under the materials table.
  • There’s no central CDN. If you want to serve materials from a CDN later, set NEXT_PUBLIC_FILE_BASE_URL in .env to point at it.

Adding a material

You can add a material in two ways:

From inside an add node (most common)

  1. Drop an add node onto the canvas via the Smart Island (e.g. the Image icon).
  2. The node renders an in-place picker — click it, choose a file, and the material is uploaded.
  3. 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

  1. Open Portfolio (left sidebar FolderOpen).
  2. Click Upload and pick one or more files.
  3. 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:

  1. Open the Portfolio dialog.
  2. Find the material (filter by modality if needed).
  3. 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.