title: Download uploaded file with DropzoneJs
body: <p>I would like to know if it is possible to download files that have been uploaded with Dropzone. For example add to the file that are shown in the dropzone a link or a button to download.</p>
  
  <p>The code for upload and to show the files already uploaded:</p>
  
  <p>index.php</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;  
  &lt;link href="css/dropzone.css" type="text/css" rel="stylesheet" /&gt;
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="dropzone.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  
  Dropzone.options.myDropzone = {
  
      init: function() {
          thisDropzone = this;
  
          $.get('upload.php', function(data) {
  
              $.each(data, function(key,value){
  
                  var mockFile = { name: value.name, size: value.size };
  
                  thisDropzone.emit("addedfile", mockFile);
  
                  thisDropzone.emit("thumbnail", mockFile, "uploads/"+value.name);
  
              });
  
          });
  
  
          thisDropzone.on("addedfile", function(file) {
  
          var removeButton = Dropzone.createElement("&lt;button&gt;Remove&lt;/button&gt;");
  
  
          var _this = this;
  
          removeButton.addEventListener("click", function(e) {
            e.preventDefault();
            e.stopPropagation();
  
            _this.removeFile(file);
  
          });
  
  
          file.previewElement.appendChild(removeButton);
        });
  
  
           thisDropzone.on("removedfile", function(file) {
        if (!file.serverId) { return; } 
        $.post("delete-file.php?id=" + file.serverId); 
      });
  
      }
  
  };
  &lt;/script&gt; 
  
  &lt;/head&gt; 
  &lt;body&gt;
  &lt;form action="upload.php" class="dropzone" id="my-dropzone"&gt;&lt;/form&gt;    
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>upload.php</p>
  
  <pre><code>&lt;?php
  $ds          = DIRECTORY_SEPARATOR; 
  
  $storeFolder = 'uploads';  
  
  if (!empty($_FILES)) {
  
      $tempFile = $_FILES['file']['tmp_name'];         
  
      $targetPath = dirname( __FILE__ ) . $ds. $storeFolder . $ds; 
  
      $targetFile =  $targetPath. $_FILES['file']['name']; 
  
      move_uploaded_file($tempFile,$targetFile);
  
  } else {                                                           
      $result  = array();
  
      $files = scandir($storeFolder);                 
      if ( false!==$files ) {
          foreach ( $files as $file ) {
              if ( '.'!=$file &amp;&amp; '..'!=$file) {       
                  $obj['name'] = $file;
                  $obj['size'] = filesize($storeFolder.$ds.$file);
                  $result[] = $obj;
              }
          }
      }
  
      header('Content-type: text/json');              
      header('Content-type: application/json');
      echo json_encode($result);
  }
  ?&gt;
  </code></pre>
  
  <p>any help will be much appreciated</p>