Skip to main content

File Management

ProductFlo provides a comprehensive file management system that supports version control, metadata extraction, contextual markup, and fine-grained access control. This guide explains how to work with files in the ProductFlo API.

Storage Architecture

ProductFlo uses a layered storage architecture:
Primary storage for all files using S3-compatible object storage systems

File Upload

POST /files/upload

Upload one or more files to ProductFlo
The upload process follows these steps:
  1. Get a pre-signed upload URL (optional for large files)
  2. Upload the file to the URL
  3. Register the file with metadata
  4. Process the file for indexing and preview generation

Upload Parameters

string
The ID of the product to associate the file with
string
Virtual folder path for organizing files
string
Optional description of the file
array
Optional array of tags for categorizing the file
boolean
default:false
Whether the file should be publicly accessible
boolean
default:false
Whether to replace any existing file with the same name

File Download

GET /files/{file_id}/download

Download a file

File Revisions

ProductFlo automatically maintains file revisions when files are updated. You can access previous versions of a file using the revision endpoints.

GET /files/{file_id}/revisions

List all revisions of a file

GET /files/{file_id}/revisions/{revision_id}

Get a specific revision of a file

POST /files/{file_id}/revert/{revision_id}

Revert to a previous revision

File Metadata

Files in ProductFlo have rich metadata that includes:
  • Basic properties (name, size, type, creation date)
  • Custom properties (user-defined metadata)
  • Extracted metadata (from file contents)
  • Relationships (products, conversations, etc.)
  • Access control information

File Processing

When files are uploaded, ProductFlo performs several processing steps:
  1. Virus scanning: Checks files for malware
  2. Metadata extraction: Pulls out technical information from the file
  3. Preview generation: Creates images or 3D previews depending on file type
  4. Indexing: Makes the file content searchable
  5. Classification: Automatically categorizes files

CAD File Support

ProductFlo has specialized support for CAD files:
  • Format support: STEP, IGES, STL, OBJ, SLDPRT, DWG, DXF, and more
  • 3D preview: Web-based 3D viewing without specialized software
  • Measurement tools: Measure dimensions directly in the preview
  • Metadata extraction: Extracts dimensions, components, materials, etc.
  • Markup support: Add annotations and comments to specific parts

GET /files/{file_id}/cad-metadata

Get detailed CAD-specific metadata

File Annotations and Markup

ProductFlo allows you to add contextual annotations to files, which are especially useful for technical documentation and design reviews.

POST /files/{file_id}/annotations

Add an annotation to a file

GET /files/{file_id}/annotations

Get all annotations for a file

Annotation Data Structure

File Access Control

ProductFlo provides fine-grained access control for files:
  • User-level permissions: Control which users can view, edit, or delete files
  • Team-level permissions: Grant access to entire teams
  • Role-based access: Define access based on user roles
  • Public/private files: Make files publicly accessible when needed
  • Temporary access: Generate time-limited access tokens

PUT /files/{file_id}/permissions

Update file permissions

GET /files/{file_id}/access-token

Generate a temporary access token

Best Practices

When working with files in ProductFlo, follow these best practices:
  1. Chunk large uploads: For files larger than 100MB, use chunked uploads to improve reliability.
  2. Include metadata: Always provide as much metadata as possible during upload for better searchability.
  3. Use revisions: Instead of creating new files, update existing ones to maintain revision history.
  4. Optimize file size: Compress files when possible before uploading, especially images and CAD files.
  5. Use appropriate permissions: Restrict file access to only those who need it.
  6. Add context: Use annotations and comments to provide context for files.
  7. Organize with folders: Use folder paths to maintain a logical structure.
  8. Use tags: Tag files consistently for easier filtering and searching.