title: How to get tempName in yii2 UploadedFile Object?
body: <p>I have made uploads file module in yii2 with angularJs.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;input type="file" ngf-select ng-model="questionData.excel_file" name="excel_file" ngf-max-size="20MB" required/&gt;
  </code></pre>
  
  <p><strong>PHP:</strong></p>
  
  <pre><code>$model-&gt;excel_file = UploadedFile::getInstance($model, 'excel_file');
  print "&lt;pre&gt;";
  print_r($model-&gt;excel_file);
  print "&lt;/pre&gt;";
  exit;
  </code></pre>
  
  <p><strong>OUTPUT:</strong></p>
  
  <pre><code>yii\web\UploadedFile Object
  (
      [name] =&gt; question.xls
      [tempName] =&gt; C:\xampp\tmp\phpF66E.tmp
      [type] =&gt; application/vnd.ms-excel
      [size] =&gt; 20480
      [error] =&gt; 0
  )
  </code></pre>
  
  <p>How to get <strong>tempName</strong> in Yii2 UploadedFile Object</p>
  
  <p>I have get tempName using following method <strong>$model->excel_file->tempName;</strong>. But, return error </p>
  
  <blockquote>
    <p>"Trying to get property of non-object"</p>
  </blockquote>