title: How use Jquery-File-Upload PHP with database in last release?
body: <p>How to use <a href="https://github.com/blueimp/jQuery-File-Upload" rel="nofollow">jQuery-File-Upload</a> with PHP and database?
  I want to insert or delete rows about images when I upload or delete images and that name of each image will be as time() when they are uploaded to the directory.</p>
  
  <p>All result I found through google tell me that I need edit to upload.class.php but the last release <a href="https://github.com/blueimp/jQuery-File-Upload/tree/master/server/php" rel="nofollow">has index.php and UploadHandler.php only</a>...</p>
  
  <p>file UploadHandler.php has class UploadHandler with code </p>
  
  <pre><code>public function post($print_response = true) {
          if (isset($_REQUEST['_method']) &amp;&amp; $_REQUEST['_method'] === 'DELETE') {
              return $this-&gt;delete($print_response);
          }
          $upload = isset($_FILES[$this-&gt;options['param_name']]) ?
              $_FILES[$this-&gt;options['param_name']] : null;
          // Parse the Content-Disposition header, if available:
          $file_name = isset($_SERVER['HTTP_CONTENT_DISPOSITION']) ?
              rawurldecode(preg_replace(
                  '/(^[^"]+")|("$)/',
                  '',
                  $_SERVER['HTTP_CONTENT_DISPOSITION']
              )) : null;
          $file_type = isset($_SERVER['HTTP_CONTENT_DESCRIPTION']) ?
              $_SERVER['HTTP_CONTENT_DESCRIPTION'] : null;
          // Parse the Content-Range header, which has the following form:
          // Content-Range: bytes 0-524287/2000000
          $content_range = isset($_SERVER['HTTP_CONTENT_RANGE']) ?
              preg_split('/[^0-9]+/', $_SERVER['HTTP_CONTENT_RANGE']) : null;
          $size =  $content_range ? $content_range[3] : null;
          $info = array();
          if ($upload &amp;&amp; is_array($upload['tmp_name'])) {
              // param_name is an array identifier like "files[]",
              // $_FILES is a multi-dimensional array:
              foreach ($upload['tmp_name'] as $index =&gt; $value) {
                  $info[] = $this-&gt;handle_file_upload(
                      $upload['tmp_name'][$index],
                      $file_name ? $file_name : $upload['name'][$index],
                      $size ? $size : $upload['size'][$index],
                      $file_type ? $file_type : $upload['type'][$index],
                      $upload['error'][$index],
                      $index,
                      $content_range
                  );
  
              }
          } else {
              // param_name is a single object identifier like "file",
              // $_FILES is a one-dimensional array:
              $info[] = $this-&gt;handle_file_upload(
                  isset($upload['tmp_name']) ? $upload['tmp_name'] : null,
                  $file_name ? $file_name : (isset($upload['name']) ?
                          $upload['name'] : null),
                  $size ? $size : (isset($upload['size']) ?
                          $upload['size'] : $_SERVER['CONTENT_LENGTH']),
                  $file_type ? $file_type : (isset($upload['type']) ?
                          $upload['type'] : $_SERVER['CONTENT_TYPE']),
                  isset($upload['error']) ? $upload['error'] : null,
                  null,
                  $content_range
              );
          }
          return $this-&gt;generate_response($info, $print_response);
      }
  
  
  
  public function delete($print_response = true) {
              $file_name = $this-&gt;get_file_name_param();
              $file_path = $this-&gt;get_upload_path($file_name);
              $success = is_file($file_path) &amp;&amp; $file_name[0] !== '.' &amp;&amp; unlink($file_path);
              if ($success) {
                  foreach($this-&gt;options['image_versions'] as $version =&gt; $options) {
                      if (!empty($version)) {
                          $file = $this-&gt;get_upload_path($file_name, $version);
                          if (is_file($file)) {
                              unlink($file);
                          }
                      }
                  }
              }
              return $this-&gt;generate_response($success, $print_response);
          }
  </code></pre>
  
  <p>What rows do I need to add to insert or delete file names in mysql?</p>
  
  <p>P.S.: I use PHP</p>