web\UploadedFile getInstances()

getInstances() public static method Returns all uploaded files for the given model attribute. public static yii\web\UploadedFile[] getInstances ( $model, $attribute )$model yii\base\Model The data model $attribute string The attribute name. The attribute name may contain array indexes for tabular file uploading, e.g. '[1]file'. return yii\web\UploadedFile[] Array of UploadedFile objects. Empty array is returned if no available file was found for the given attribute.

web\UploadedFile getInstanceByName()

getInstanceByName() public static method Returns an uploaded file according to the given file input name. The name can be a plain string or a string like an array element (e.g. 'Post[imageFile]', or 'Post[0][imageFile]'). public static null|yii\web\UploadedFile getInstanceByName ( $name )$name string The name of the file input field. return null|yii\web\UploadedFile The instance of the uploaded file. Null is returned if no file is uploaded for the specified name.

web\UploadedFile getInstance()

getInstance() public static method Returns an uploaded file for the given model attribute. The file should be uploaded using yii\widgets\ActiveField::fileInput(). See also getInstanceByName(). public static yii\web\UploadedFile getInstance ( $model, $attribute )$model yii\base\Model The data model $attribute string The attribute name. The attribute name may contain array indexes. For example, '[1]file' for tabular file uploading; and 'file[1]' for an element in a file array. return yi

web\UploadedFile getHasError()

getHasError() public method public boolean getHasError ( )return boolean Whether there is an error with the uploaded file. Check $error for detailed error code information.

web\UploadedFile getExtension()

getExtension() public method public string getExtension ( )return string File extension

web\UploadedFile getBaseName()

getBaseName() public method public string getBaseName ( )return string Original file base name

web\UploadedFile $type

$type public property The MIME-type of the uploaded file (such as "image/gif"). Since this MIME type is not checked on the server-side, do not take this value for granted. Instead, use yii\helpers\FileHelper::getMimeType() to determine the exact MIME type. public string $type = null

web\UploadedFile $tempName

$tempName public property The path of the uploaded file on the server. Note, this is a temporary file which will be automatically deleted by PHP after the current request is processed. public string $tempName = null

web\UploadedFile $size

$size public property The actual size of the uploaded file in bytes public integer $size = null

web\UploadedFile $name

$name public property The original name of the file being uploaded public string $name = null