title: Codeigniter drag and drop
body: <p>I am new to codeigniter.Can anyone please tell me how to include drag and drop feature to upload multiple images in Codeigniter with complete description of MVC Architecture and code.
  Here is my controller dropzone.php</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Dropzone extends CI_Controller {
  
  public function __construct() {
  parent::__construct();
  $this-&gt;load-&gt;helper(array('url','html','form'));
  }
  
  public function index() {
  $this-&gt;load-&gt;view('dropzone_view');
  }
  public function upload() {
  if (!empty($_FILES)) {
   $tempFile = $_FILES['file']['tmp_name'];
  $fileName = $_FILES['file']['name'];
  $targetPath = getcwd() . '/uploads/';
  $targetFile = $targetPath . $fileName ;
  move_uploaded_file($tempFile, $targetFile);
  // if you want to save in db,where here
  // with out model just for example
  // $this-&gt;load-&gt;database(); // load database
  // $this-&gt;db-&gt;insert('file_table',array('file_name' =&gt; $fileName));
  }
     }
  }
  
  /* End of file dropzone.js */
  /* Location: ./application/controllers/dropzone.php */
  
  
   and here is my views:
  &lt;html&gt;
  &lt;head&gt;
  &lt;link href="&lt;?php echo base_url(); ?&gt;resouces/css/dropzone.css"         type="text/css" rel="stylesheet" /&gt;
  &lt;script src="&lt;?php echo base_url(); ?&gt;resouces/dropzone.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;h1&gt;File Upload using dropzone.js and Codeigniter - arjun.net.in&lt;/h1&gt;
  &lt;form action="&lt;?php echo site_url('/dropzone/upload'); ?&gt;" class="dropzone"   &gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  
  and I also have uploads folder and resources folder that contains copy of  all dropzone-4.0.1 zip file.
  But while running localhost/drag/index.php/dropzone , drag is the project     name, it is showing ;
  
  File Upload using dropzone.js and Codeigniter - arjun.net.in
  </code></pre>