siriusphp/upload
SiriusPHP Upload is a framework-agnostic PHP library for handling file uploads with flexible, rule-based validation. It checks files by size, extension, MIME type, and image dimensions, and supports optional image processing such as resizing and cropping.
Architecture fit
$_FILES (including nested/multi-file arrays), wraps uploads in a File abstraction, and applies validators (size, extension, MIME) before a move/copy step. That is the same responsibility Laravel already covers through Illuminate\Http\UploadedFile, validation rules (file, mimes, max), and Flysystem-backed Storage disks.Integration feasibility
UploadedFile into the Sirius container/File shape, plus exception translation into Laravel validation messages and HTTP responses. Roughly 1–2 days of glue for a clean boundary.Storage/Flysystem. If Sirius writes directly to disk, we lose disk abstraction, path sanitization, and test fakes.Technical risk
finfo vs. extension trust), path traversal handling, double-extension edge cases, and whether validation occurs before or after the temp file move must all be audited. If the MIME check is extension-driven, it is materially weaker than Laravel's mimes rule which uses content sniffing.Key questions
finfo/content sniffing, or extension mapping?UploadedFileInterface, or only superglobal arrays?Stack fit
Storage/Flysystem remains the only writer; Sirius supplies the rule set and the normalized file model.Storage::putFile already covers the requirement with zero added dependency risk. Adoption should be justified by a cross-runtime requirement, not by feature gaps.Migration path
UploadValidator) with a Laravel-native implementation first and a Sirius-backed implementation second. This keeps the decision reversible and lets us A/B the rule outcomes.Compatibility
files[] with nested keys) identically to Laravel's hasFile/file helpers, otherwise error mapping becomes fragile.Sequencing
Maintenance
Support
Scaling
memory_limit and per-node concurrency for big uploads. Validate with realistically large files before rollout.Failure modes
Ramp-up
How can I help you explore Laravel packages today?