UploadedFile
class UploadedFile (View source)
Describes a persisted upload while exposing a public-relative path only for public storage.
Methods
Records the final storage identity, detected media type, byte count, and delivery visibility.
Returns the generated basename used in the selected storage directory.
Returns the internal absolute filesystem path intended for trusted application-side operations.
Returns the storage-relative identifier below the public or private upload root.
Returns the server-detected media type retained after successful validation.
Returns the final persisted byte count.
Identifies whether the stored upload is publicly published or privately retained.
Returns the web-root-relative path for public uploads and null for private uploads.
Details
__construct
__construct(string $storedFilename, string $storedPath, string $storedRelativePath, string $mimeType, int $sizeBytes, UploadVisibility $visibility = UploadVisibility::Public, string|null $publicRelativePath = null)
Records the final storage identity, detected media type, byte count, and delivery visibility.
storedFilename
string
storedFilename()
Returns the generated basename used in the selected storage directory.
storedPath
string
storedPath()
Returns the internal absolute filesystem path intended for trusted application-side operations.
storedRelativePath
string
storedRelativePath()
Returns the storage-relative identifier below the public or private upload root.
mimeType
string
mimeType()
Returns the server-detected media type retained after successful validation.
sizeBytes
int
sizeBytes()
Returns the final persisted byte count.
visibility
UploadVisibility
visibility()
Identifies whether the stored upload is publicly published or privately retained.
publicRelativePath
string|null
publicRelativePath()
Returns the web-root-relative path for public uploads and null for private uploads.