title: Unable to upload a base64 encoded image using Codeigniter
body: <p>I have to upload a base64 encoded image that i am receiving from android application. I am using php codeigniter framework. 
  While searching through the forum, the question at this link <a href="https://stackoverflow.com/questions/7976806/how-to-upload-base64encoded-image-in-codeigniter">How to upload base64encoded image in codeigniter</a> is same as mine, but the solution there is not working for me.</p>
  
  <p>Here is the code that i have written:</p>
  
  <pre><code>private function _save_image() {
      $image = base64_decode($_POST['imageString']);
      #setting the configuration values for saving the image
      $config['upload_path'] = FCPATH . 'path_to_image_folder';
      $config['file_name'] = 'my_image'.$_POST['imageType'];
      $config['allowed_types'] = 'gif|jpg|jpeg|png';
      $config['max_size'] = '2048';
      $config['remove_spaces'] = TRUE;
      $config['encrypt_name'] = TRUE;
  
  
      $this-&gt;load-&gt;library('upload', $config);
      if($this-&gt;upload-&gt;do_upload($image)) {
          $arr_image_info = $this-&gt;upload-&gt;data();
          return ($arr_image_info['full_path']);
      }
      else {
          echo $this-&gt;upload-&gt;display_errors();
          die();
      }
  }
  </code></pre>
  
  <p>I am getting "you did not select a file to upload"</p>
  
  <p>Thanks for your time. </p>