FileUploadOptions
final class FileUploadOptions (View source)
Defines the resolved generic-upload policy passed to validation and storage services.
Extensions are an explicit allowlist and are paired with server-detected MIME values through MimeTypeCatalog.
Methods
Creates a policy with an absolute constrained target and its visibility-specific storage-relative counterpart.
Provides the absolute directory selected for final file publication.
Provides the directory retained relative to either the public root or private writable root.
Provides the positive server-enforced payload limit in bytes.
Provides normalized filename suffixes that may proceed to catalog MIME matching.
Identifies whether the validated file is published publicly or retained in private writable storage.
Provides the non-passive risk categories explicitly authorized for private storage.
Details
__construct
__construct(string $targetDirectory, string $targetRelativeDirectory, int $maxBytes = 10485760, array $allowedExtensions = [], UploadVisibility $visibility = UploadVisibility::Public, array $allowedRisks = [])
Creates a policy with an absolute constrained target and its visibility-specific storage-relative counterpart.
targetDirectory
string
targetDirectory()
Provides the absolute directory selected for final file publication.
targetRelativeDirectory
string
targetRelativeDirectory()
Provides the directory retained relative to either the public root or private writable root.
maxBytes
int
maxBytes()
Provides the positive server-enforced payload limit in bytes.
allowedExtensions
array
allowedExtensions()
Provides normalized filename suffixes that may proceed to catalog MIME matching.
visibility
UploadVisibility
visibility()
Identifies whether the validated file is published publicly or retained in private writable storage.
allowedRisks
array
allowedRisks()
Provides the non-passive risk categories explicitly authorized for private storage.