FileUploadProfileConfig
final class FileUploadProfileConfig (View source)
Carries one resolved generic-upload policy after extension validation and byte-size parsing.
Allowed extensions are the canonical allowlist; their server-detected MIME compatibility remains enforced by MimeTypeCatalog at upload time.
Methods
Records the normalized profile values consumed by UploadFactory.
Returns the validated relative directory configured for this profile.
Returns the maximum number of bytes accepted while staging an upload.
Returns the normalized filename extensions accepted by this profile.
Returns whether accepted files are published to public or private storage.
Returns the non-passive MIME risk categories explicitly allowed for private storage.
Details
__construct
__construct(string $targetDirectory, int $maxBytes, array $allowedExtensions, UploadVisibility $visibility = UploadVisibility::Public, array $allowedRisks = [])
Records the normalized profile values consumed by UploadFactory.
targetDirectory
string
targetDirectory()
Returns the validated relative directory configured for this profile.
maxBytes
int
maxBytes()
Returns the maximum number of bytes accepted while staging an upload.
allowedExtensions
array
allowedExtensions()
Returns the normalized filename extensions accepted by this profile.
visibility
UploadVisibility
visibility()
Returns whether accepted files are published to public or private storage.
allowedRisks
array
allowedRisks()
Returns the non-passive MIME risk categories explicitly allowed for private storage.