Skip to main content

Overview

Preview files are media files (images, videos, or other formats) attached to tasks for review and feedback. They support automatic thumbnail generation, video normalization, annotations, and multiple revisions per task.

Preview File Model

Preview files contain the following key properties:
  • id: Unique identifier (UUID)
  • task_id: Associated task
  • revision: Version number
  • position: Order within revision
  • name: Display name
  • original_name: Original filename
  • extension: File type (mp4, png, etc.)
  • status: Processing status (processing, ready, broken)
  • source: Upload source (webgui, api, etc.)
  • file_size: Size in bytes
  • width: Image/video width in pixels
  • height: Image/video height in pixels
  • duration: Video duration in seconds
  • annotations: Review annotations array
  • person_id: Uploader
  • created_at: Upload timestamp
  • updated_at: Last modification timestamp

Supported Formats

Pictures

Supported extensions: jpg, jpeg, jpe, png
  • Automatic thumbnail generation (square and rectangle)
  • Original resolution preserved
  • Multiple size variants created

Movies

Supported extensions: mp4, mov, avi, mkv, webm, m4v, wmv
  • Normalized to MP4 format
  • Automatic thumbnail extraction
  • Tile generation for scrubbing
  • Low-def version for faster streaming

Other Files

Supported extensions: pdf, psd, psb, ai, blend, ma, mb, hip, fbx, obj, glb, gltf, svg, exr, and more
  • Stored as-is without processing
  • Direct download available
Source: zou/app/blueprints/previews/resources.py:44-88

Upload Preview Files

Create Preview File Entry

First, create a preview file entry via comment:
Request: Multipart form data
Source: zou/app/blueprints/previews/resources.py:555-599

Upload to Existing Preview

Upload file content to an existing preview entry:
Request: Multipart form data with file
Query Parameters:
  • normalize (optional): Enable video normalization (default: true)
Source: zou/app/blueprints/previews/resources.py:376-437

Download Preview Files

Get Preview Movie

Download the normalized MP4 video:
Response: Video file with caching headers Source: zou/app/blueprints/previews/resources.py:658-700

Get Low-Def Movie

Download low-definition version for streaming:
Falls back to full quality if low-def not available. Source: zou/app/blueprints/previews/resources.py:703-751

Download as Attachment

Force download with original filename:
Source: zou/app/blueprints/previews/resources.py:754-798

Get Preview Image

Download image preview:
Supported extensions: png, pdf, etc. Source: zou/app/blueprints/previews/resources.py:801-865

Thumbnails

Rectangle Thumbnail

Get standard thumbnail (optimized for 16:9 aspect ratio):
Source: zou/app/blueprints/previews/resources.py:1086-1089

Square Thumbnail

Get square thumbnail (for avatars, cards):
Source: zou/app/blueprints/previews/resources.py:1106-1108

Original Resolution

Get full-resolution preview image:
Source: zou/app/blueprints/previews/resources.py:1111-1113

Preview Size

Get medium-resolution preview:
Source: zou/app/blueprints/previews/resources.py:1097-1103

Tile Preview

Get tile sprite for video scrubbing:
Source: zou/app/blueprints/previews/resources.py:1092-1094

Preview Management

Set as Main Preview

Set a preview as the entity’s main preview:
Query Parameters:
  • frame_number (optional): Extract specific frame from movie
Request Body:
Response:
Source: zou/app/blueprints/previews/resources.py:1329-1399

Update Preview Position

Change the order of previews within a revision:
Request Body:
Source: zou/app/blueprints/previews/resources.py:1402-1458

Delete Preview File

Use the deletion service to remove a preview:
Source: zou/app/services/files_service.py:890-899

Annotations

Update Annotations

Add, update, or delete annotations on a preview:
Request Body:
Response: Updated preview file with annotations Source: zou/app/blueprints/previews/resources.py:1461-1562

Annotation Format

Annotations are stored as an array of time-based drawings:
Source: zou/app/services/preview_files_service.py:413-579

Video Processing

Normalization

Videos are automatically normalized to:
  • Format: MP4 (H.264)
  • Resolution: Project or entity resolution (default: 1080p height)
  • Frame rate: Project or entity FPS (default: 25.00)
  • Variants: Full quality + low-def version
Source: zou/app/services/preview_files_service.py:185-336

Processing Status

Preview files have three statuses:
  • processing: Video is being normalized
  • ready: File is ready for viewing
  • broken: Processing failed
Check status before displaying:

Background Processing

When job queue is enabled, video normalization happens asynchronously:
Source: zou/app/blueprints/previews/resources.py:241-270

Advanced Features

Extract Frame from Movie

Extract a specific frame from a video:
Query Parameters:
  • frame_number (optional): Frame to extract (default: 0)
Response: PNG image of the frame Source: zou/app/blueprints/previews/resources.py:1637-1694

Extract Tile

Generate or retrieve tile sprite for scrubbing:
Response: Tile sprite PNG Source: zou/app/blueprints/previews/resources.py:1697-1743

Running Preview Files

Get all previews currently processing or broken:
Query Parameters:
  • cursor_preview_file_id (optional): Pagination cursor
  • limit (optional): Max results per page
Response:
Source: zou/app/blueprints/previews/resources.py:1565-1634

Preview Background Files

Upload HDR Background

Upload an HDR background for preview compositing:
Request: Multipart form data with HDR file Supported extensions: hdr Source: zou/app/blueprints/previews/resources.py:1746-1913

Get Background File

Download preview background:
Source: zou/app/blueprints/previews/resources.py:1915-1977

Get Background Thumbnail

Get thumbnail of background file:
Source: zou/app/blueprints/previews/resources.py:1980-1993

Best Practices

Revision Management

  • Preview revisions match comment revisions
  • Multiple previews can be in one revision
  • Use position to order previews within revision

Video Upload

  • Enable normalization for consistent playback
  • Wait for status=ready before displaying
  • Use low-def version for faster streaming
  • Check file_size before upload for large files

Thumbnails

  • Use square thumbnails for cards and lists
  • Use rectangle thumbnails for preview strips
  • Thumbnails are auto-generated for images and videos
  • Cache thumbnail URLs client-side

Annotations

  • Store annotations at preview level, not comment
  • Use time-based keys for video annotations
  • Generate unique IDs for annotation objects
  • Use additions/updates/deletions for atomic changes

Example Workflow