title: I cannot get the uploaded file returned using codeignter3 fileupload()
body: <p>I have the following code for file upload in the corresponding model file of codeigniter3.</p>
  <pre><code>$config['upload_path']      = './assets/img/report/';
          $config['allowed_types']    = 'txt|odt|jpg|png|jpeg|pdf|docx';
          $config['file_name']        = $this-&gt;id;
          $config['overwrite']        = true;
          $config['max_size']         = '150000';
          
          $this-&gt;load-&gt;library('upload', $config);
  
          if ($this-&gt;upload-&gt;do_upload('file')) {
              return $this-&gt;upload-&gt;data('file_name');
          }
          return default.jpg;
  </code></pre>
  <p>The corresponding view file has the following code</p>
  <pre><code>&lt;div class=&quot;form-group&quot;&gt;
                  &lt;label for=&quot;file&quot;&gt;Attachment&lt;/label&gt;
                      &lt;input class=&quot;form-control-file&quot;
                      type=&quot;file&quot; name=&quot;file&quot; /&gt;
                      &lt;div class=&quot;invalid-feedback&quot;&gt;
                          &lt;?php echo form_error('file') ?&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
  </code></pre>
  <p>But the code always returns default.jpg. How can I fix to return the uploaded file correctly. I use CI3 in Debian 11 running xampp8.1</p>