UploadedFileInterface
interface UploadedFileInterface (View source)
Provides an interface for uploaded files.
Methods
Returns the original file name.
Returns whether the file was uploaded successfully.
Returns an informative upload error message.
Returns the upload error code.
Gets file size.
Gets the absolute path to the file.
Gets the path to the file.
Gets the filename.
Details
string
getClientOriginalName()
Returns the original file name.
The file name is extracted from the request that uploaded the file and as such should not be considered a safe value.
bool
isValid()
Returns whether the file was uploaded successfully.
string
getErrorMessage()
Returns an informative upload error message.
int
getError()
Returns the upload error code.
If the upload was successful, the constant UPLOAD_ERR_OK is returned. Otherwise, one of the other UPLOAD_ERR_XXX constants is returned.
int
getSize()
Gets file size.
string|false
getRealPath()
Gets the absolute path to the file.
string
getPathname()
Gets the path to the file.
string
getFilename()
Gets the filename.