FileMagic's first public release provides one consistent Laravel workflow for
accepting, validating, storing, querying, downloading, and deleting files.
Highlights
- Store uploads, local paths, strings or binary content, Base64 input, remote
HTTP(S) files, and generated TXT, JSON, or CSV documents throughPendingFile. - Inspect actual file content with PHP Fileinfo, streamed size and checksum
calculation, MIME restrictions, normalized paths, visibility, metadata, and
ownership. - Import remote files with TLS verification by default, SSRF protection,
redirect and DNS validation, private-network restrictions, byte limits, and
explicit HTML opt-in. - Resize supported images with optional Intervention Image 4 while preserving
unsupported file formats unchanged. - Resolve IDs, UUIDs, stored-file models, arrays, Laravel Collections, and
variadic targets through the unifiedFileMagic::find()API. - Create optional streamed ZIP downloads with bounded limits and safe entry
names. - Recover failed overwrites, reconcile partial batch deletions, and audit
database-to-storage consistency with the read-only-by-default
file-magic:auditcommand. - Configure the stored-file model, connection, table, primary key, and owner
relation.
Requirements
- PHP 8.3 or later
- Laravel 12 or 13
- PHP
ext-fileinfo - Optional PHP
ext-curlforfromUrl() - Optional PHP
ext-zipfor ZIP downloads - Optional Intervention Image 4 with GD or Imagick for image processing
Read the complete documentation
or review the full changelog.