title: How to show a custom error message in DropzoneJS?
body: <p>I need to check if a file has a valid MIME type, if the file size is ok and if its dimensions are ok, then upload file.</p>
  
  <p>So when everything is OK, I can use:</p>
  
  <pre><code>complete: function(file){
      // do something here.
  }
  </code></pre>
  
  <p>but what if the size of file was invalid? In my PHP script I return an error message:</p>
  
  <pre><code>return json_encode(['error' =&gt; 'size is invalid']);
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>return Response::json(['error' =&gt; 'size is invalid'], 500 ];
  // this is Laravel 4 syntax. returns a json array and 500 as status code.
  </code></pre>
  
  <p>but how can I handle that <code>error</code> in DropzoneJS?</p>
  
  <p>I tried adding a second parameter to the <code>complete()</code> function but it's not working.</p>
  
  <pre><code>complete: function(file, response){
      console.log( response ); // this does not work.
  }
  </code></pre>