The file should be uploaded using [[\yii\widgets\ActiveField::fileInput()]].
public static getInstance ( |
||
$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 | the instance of the uploaded file. Null is returned if no file is uploaded for the specified model attribute. |