File Management
Managing files and assets in ProductFlo
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
Primary storage for all files using S3-compatible object storage systems
Temporary storage for files being processed or used in active sessions
Stores file metadata, permissions, and relationships to other entities
File Upload
POST /files/upload
Upload one or more files to ProductFlo
The upload process follows these steps:
- Get a pre-signed upload URL (optional for large files)
- Upload the file to the URL
- Register the file with metadata
- Process the file for indexing and preview generation
Upload Parameters
The ID of the product to associate the file with
Virtual folder path for organizing files
Optional description of the file
Optional array of tags for categorizing the file
Whether the file should be publicly accessible
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:
- Virus scanning: Checks files for malware
- Metadata extraction: Pulls out technical information from the file
- Preview generation: Creates images or 3D previews depending on file type
- Indexing: Makes the file content searchable
- 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:
-
Chunk large uploads: For files larger than 100MB, use chunked uploads to improve reliability.
-
Include metadata: Always provide as much metadata as possible during upload for better searchability.
-
Use revisions: Instead of creating new files, update existing ones to maintain revision history.
-
Optimize file size: Compress files when possible before uploading, especially images and CAD files.
-
Use appropriate permissions: Restrict file access to only those who need it.
-
Add context: Use annotations and comments to provide context for files.
-
Organize with folders: Use folder paths to maintain a logical structure.
-
Use tags: Tag files consistently for easier filtering and searching.