UploadConfigResolver
final class UploadConfigResolver (View source)
Converts typed upload definitions into fail-fast runtime policies consumed by UploadFactory.
It normalizes target paths, visibility, risk authorization, extension families, and byte limits before a request can reach an uploader.
Methods
Creates a resolver using the composed MIME catalog, or the framework catalog for isolated use.
Merges layered definitions into profiles with normalized extensions and positive byte limits.
Details
__construct
__construct(MimeTypeCatalog|null $catalog = null, ByteSizeParser $byteSizeParser = new ByteSizeParser(), UploadRiskPolicy $riskPolicy = new UploadRiskPolicy())
Creates a resolver using the composed MIME catalog, or the framework catalog for isolated use.
The parser is shared so all supported size syntax has one binary-byte interpretation.
resolve
UploadConfig
resolve(UploadConfigDefinition ...$definitions)
Merges layered definitions into profiles with normalized extensions and positive byte limits.
Unsafe paths, unauthorized format risks, unknown extensions, legacy MIME policies, and malformed limits are rejected before upload services are used.