title: Why is my upload path invalid? (Codeigniter-Library)
body: <p>I'm creating a library as part of a project and one of the methods is a wrapper for the upload helper. </p>
  
  <p>The method: </p>
  
  <pre><code> public function upload(){
  
      echo "Doing upload";
  
      $config['upload_path']= RESOURCE_PATH . "Downloads";
      $config['allowed_types']='pdf|doc';
      $config['max_size']='10000';
      //echo $config['upload_path'];
  
      $this-&gt;CI-&gt;load-&gt;library('upload',$config);
  
      if(!$this-&gt;CI-&gt;upload-&gt;do_upload()){
          echo "Couldn't do the upload";
          echo $this-&gt;CI-&gt;upload-&gt;display_errors();
          echo $config['upload_path'];
      }
      else{
          echo "Could do the upload";
      }
  }
  </code></pre>
  
  <p>I've checked the directory permissions of the Downloads folder and that it exists but I'm getting the following error: <strong>"The upload path does not appear to be valid."</strong> </p>
  
  <p>How do I resolve this issue?</p>
  
  <p><strong>EDIT:: I created a symlink so my directory strucutre really looks like:</strong></p>
  
  <pre><code> www -&gt; /home/user/Dropbox/www/appname
  </code></pre>
  
  <p>Note about variables used:</p>
  
  <pre><code>$this-&gt;CI = &amp;get_instance(); // Defined in custom library class 
  define('RESOURCE_PATH', APPPATH . 'views/resources/'); // Defined in constants.php
  </code></pre>