title: Problems getting instance of UploadedFile in Yii2
body: <p>I tried to upload a file to a server using <code>UploadedFile</code> class, but I can't get an Instance. In my Model:</p>
  
  <pre><code>public $arch;
  public function rules() {
      return [[['arch'], 'file']];
  }
  </code></pre>
  
  <p>Before <code>$model-&gt;arch = file_xxxx.jpg</code></p>
  
  <p>Controller:</p>
  
  <pre><code>$model-&gt;arch = UploadedFile::getInstance($model, 'arch');
  </code></pre>
  
  <p>After this <code>$model-&gt;arch is NULL</code></p>
  
  <p>View:</p>
  
  <pre><code>$form = ActiveForm::begin(
      ['id' =&gt; 'contact-form'],
      ['options' =&gt; ['enctype' =&gt; 'multipart/form-data']]
  );
  print $form-&gt;field($model, 'arch')-&gt;fileInput()-&gt;label(false);
  </code></pre>