title: Custom Upload Images using CKEditor, BLOB field and Rails 4
body: <p>I'm currently using CKEditor in my site. The user may upload some images to the server using the button for Upload Image in the CKEditor.</p>
  
  <p>There is a textarea field with id <strong>#article_conteudo</strong> on the page that uses the CKEditor, here is the javascript code to configure the editor:</p>
  
  <pre><code>CKEDITOR.replace('article_conteudo', {
      filebrowserImageUploadUrl: '/article/upload/'
  });
  </code></pre>
  
  <p>The URL <strong>/article/upload/</strong> points to a method <em>file_upload</em> in an <em>articles_controller</em>:</p>
  
  <pre><code>def file_upload
      image = ArticlesImage.new
  
      image.imagem = params[:upload].read
  
      image.save
  end
  </code></pre>
  
  <p>The images are stored in a <strong>BLOB</strong> field in a MySQL Database.</p>
  
  <p>The images are saved in the database with no problems. But, after saving, nothing happens in the Editor. I'm not sure what is the expected response for the Upload Action of the CKEditor on this case. I'm not sure, also, if CKEditor uploads support the use of BLOBs.</p>
  
  <p>How can I implement this functionality in my project?</p>
  
  <p>If it can't be done with CKEditor, is there any other plugin that can do it?</p>
  
  <p>Thanks for your help</p>
  
  <p><strong>PS: The use of BLOB is MANDATORY for the project, I cannot use other methods</strong></p>