Blob Attributes
Binary file storage with S3/MinIO integration
Overview
Blob Attributes store binary data such as images, documents, audio, video, and other files. They integrate with S3-compatible storage (AWS S3, MinIO) for efficient large file handling.
When to Use Blob Attributes
Use Blob Attributes for:
- Images and photos
- PDF documents
- Audio and video files
- Any binary data that needs to be stored and retrieved
Use Key-Value Attributes instead for:
- Text content
- JSON data
- Small metadata
Creating Blob Attributes
From a File Input
From a Blob Object
Using create()
In Blueprint Pattern
Currently not usable in the blueprint pattern. Must be created and linked separately.
Reading Blob Content
Displaying an Image
Updating Blob Content
Blob updates replace the entire file. There's no partial update mechanism for binary data.
Querying Blob Attributes
Find All Blobs
Find by Type
Find by Relationship
Common Patterns
Document with Attachments
Profile Picture
File Gallery
File Upload Component
Storage Configuration
Blob Attributes can be stored in:
- S3/MinIO (recommended for production)
- PostgreSQL (fallback, for small files)
Configure S3 storage via environment variables:
If S3 is not configured, blobs are stored in PostgreSQL. This works for development but is not recommended for production with large files.
Permissions
Blob Attributes use the same authorization model:
Quota Considerations
Blob storage counts against storage quotas. Large files can quickly consume available storage.
Best Practices
-
Store metadata separately - Use Key-Value Attributes for searchable file metadata (name, type, size) and Blob for the actual content
-
Check quota before upload - Prevent failed uploads due to quota limits
-
Clean up object URLs - Call
URL.revokeObjectURL()when done displaying files to prevent memory leaks -
Use appropriate storage - Configure S3 for production deployments with large files
-
Consider file size limits - Set reasonable upload limits in your UI
-
Transfer accountability - For organization files, transfer accountability to the organization for proper quota management
Limitations
- No partial updates - Files must be replaced entirely
- No real-time collaboration - Unlike Long Text, blobs don't support OT
- Size limits - Very large files may be impractical depending on storage configuration