2.8.1 Media Library — Asset Storage and Organization
The Media Library in Praisma Hub is the centralized, tenant-scoped asset repository used by all modules, including CMS content, social publishing, analytics exports, and the photo editor. It is designed to handle large volumes of media securely while maintaining strict access control and traceability.
Media Architecture
Each media asset is stored as a first-class entity with metadata, ownership, and lifecycle tracking.
// Example: Media model (simplified) class Media extends Model { protected $fillable = [ 'tenant_id', 'folder_id', 'disk', 'path', 'mime_type', 'size', 'checksum', 'metadata' ]; }Storage characteristics:
Tenant-isolated storage namespaces
Public vs private media separation
Support for large files via direct upload flows
Immutable original files
Organization and Structure
Media assets are organized using a folder hierarchy combined with metadata-based filtering. Folders are logical constructs and do not directly mirror physical storage paths.
class MediaFolder extends Model { protected $fillable = ['tenant_id', 'parent_id', 'name']; }This separation allows assets to be reorganized without impacting storage or references.
Usage Tracking
Each media asset tracks:
Where it is referenced (content, posts, exports)
Last access timestamps
Derivative usage (thumbnails, resized versions)
This enables safe cleanup and auditability.
Summary
The Media Library provides a scalable, secure, and governed foundation for asset management across Praisma Hub.