framework/web/UploadedFile.php
public static function getInstance($model, $attribute)
    {
        $name = Html::getInputName($model, $attribute);
        return static::getInstanceByName($name);
    }
public static function getInstance($model, $attribute)
    {
        $name = Html::getInputName($model, $attribute);
        return static::getInstanceByName($name);
    }
public static function getInstance ( $ model , $ attribute ) { $ name = Html :: getInputName ( $ model , $ attribute ) ; return static :: getInstanceByName ( $ name ) ; }
Returns an uploaded file for the given model attribute.
The file should be uploaded using [[\yii\widgets\ActiveField::fileInput()]].
@param \yii\base\Model $model the data model
@param string $attribute 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 null|UploadedFile the instance of the uploaded file.
Null is returned if no file is uploaded for the specified model attribute.
@see getInstanceByName()
Returns an uploaded file for the given model attribute . The file should be uploaded using [[ \ yii \ widgets \ ActiveField :: fileInput () ]] .