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.

doc_Yii
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.