Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cgwire/zou/llms.txt
Use this file to discover all available pages before exploring further.
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
zou/app/blueprints/previews/resources.py:44-88
Upload Preview Files
Create Preview File Entry
First, create a preview file entry via comment:zou/app/blueprints/previews/resources.py:555-599
Upload to Existing Preview
Upload file content to an existing preview entry:normalize(optional): Enable video normalization (default: true)
zou/app/blueprints/previews/resources.py:376-437
Download Preview Files
Get Preview Movie
Download the normalized MP4 video:zou/app/blueprints/previews/resources.py:658-700
Get Low-Def Movie
Download low-definition version for streaming:zou/app/blueprints/previews/resources.py:703-751
Download as Attachment
Force download with original filename:zou/app/blueprints/previews/resources.py:754-798
Get Preview Image
Download image preview:png, pdf, etc.
Source: zou/app/blueprints/previews/resources.py:801-865
Thumbnails
Rectangle Thumbnail
Get standard thumbnail (optimized for 16:9 aspect ratio):zou/app/blueprints/previews/resources.py:1086-1089
Square Thumbnail
Get square thumbnail (for avatars, cards):zou/app/blueprints/previews/resources.py:1106-1108
Original Resolution
Get full-resolution preview image:zou/app/blueprints/previews/resources.py:1111-1113
Preview Size
Get medium-resolution preview:zou/app/blueprints/previews/resources.py:1097-1103
Tile Preview
Get tile sprite for video scrubbing:zou/app/blueprints/previews/resources.py:1092-1094
Preview Management
Set as Main Preview
Set a preview as the entity’s main preview:frame_number(optional): Extract specific frame from movie
zou/app/blueprints/previews/resources.py:1329-1399
Update Preview Position
Change the order of previews within a revision:zou/app/blueprints/previews/resources.py:1402-1458
Delete Preview File
Use the deletion service to remove a preview:zou/app/services/files_service.py:890-899
Annotations
Update Annotations
Add, update, or delete annotations on a preview:zou/app/blueprints/previews/resources.py:1461-1562
Annotation Format
Annotations are stored as an array of time-based drawings: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
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
Background Processing
When job queue is enabled, video normalization happens asynchronously:zou/app/blueprints/previews/resources.py:241-270
Advanced Features
Extract Frame from Movie
Extract a specific frame from a video:frame_number(optional): Frame to extract (default: 0)
zou/app/blueprints/previews/resources.py:1637-1694
Extract Tile
Generate or retrieve tile sprite for scrubbing:zou/app/blueprints/previews/resources.py:1697-1743
Running Preview Files
Get all previews currently processing or broken:cursor_preview_file_id(optional): Pagination cursorlimit(optional): Max results per page
zou/app/blueprints/previews/resources.py:1565-1634
Preview Background Files
Upload HDR Background
Upload an HDR background for preview compositing:hdr
Source: zou/app/blueprints/previews/resources.py:1746-1913
Get Background File
Download preview background:zou/app/blueprints/previews/resources.py:1915-1977
Get Background Thumbnail
Get thumbnail of background file: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
Related Resources
- Comments - Adding comments with previews
- Tasks - Task review workflow
- Working Files - Source files