title: unable to upload image to local server with froala
body: <p>I'm working on a website using codeigniter and I'm trying to use Froala Editor to upload image in a textarea. it's all working fine until I try to upload the image files to my local folder instead of the default <a href="http://i.froala.com/upload" rel="nofollow">http://i.froala.com/upload</a></p>
  
  <p>this is my html file:</p>
  
  <pre><code>&lt;textarea id="my_editor" name="my_editor" class="editor"&gt;
  &lt;/textarea&gt;
  &lt;script&gt;
    $(function() {
      $('.editor').froalaEditor({
        imageUploadURL: "test/froala_upload",
      })
    });
  &lt;/script&gt;
  </code></pre>
  
  <p>and this is the <code>froala_upload</code> function in my <code>Test</code> controller file:</p>
  
  <pre><code>function froala_upload() {
  
      // Allowed extentions.
      $allowedExts = array("gif", "jpeg", "jpg", "png", "blob");
  
      // Get filename.
      $temp = explode(".", $_FILES["file"]["name"]);
  
      // Get extension.
      $extension = end($temp);
  
      // Generate new random name.
      $name = sha1(microtime()) . "." . $extension;
  
      // Save file in the uploads folder.
      move_uploaded_file($_FILES["file"]["tmp_name"], getcwd(). "/assets/review/" . $name);
  
      // Generate response.
      $response = new StdClass;
      $response-&gt;link = "/assets/review/" . $name;
      echo stripslashes(json_encode($response));
  }
  </code></pre>
  
  <p>I deliberately omitted the image checking with <code>finfo</code> which is used in most documentation about Froala Image Upload because some people say that it could be the problem - yet I'm still unable to upload the image file. and the error message was very helpful: "Something went wrong. Please try again" </p>
  
  <p>I've spent hours scratching my head over this thing. and there is literally no full code solution for this problem on the great wide world of Internet so I can't find out what I'm doing wrong. can anyone help me with this?</p>