0
<form action="jay-upload.php"
  class="dropzone"
  id="my-awesome-dropzone"></form>

<script>
    Dropzone.options.myDropzone = {
    init: function() {
    this.on("success", function() {
    window.location.href = "http://example.com/new_url";
                                   });
                             }
                      };
    </script>

I am trying to do it like this but its not working. :(

  • Do you get any javascript errors? Also, "queuecomplete" might be a better event. That gets fired after all files have been uploaded. – georaldc Jun 07 '16 at 23:13

1 Answers1

1

You can try this code, it may work for you.

this.on("success", function() {
     if (this.getUploadingFiles().length === 0 && this.getQueuedFiles().length === 0) {
    window.location.href = 'http://example.com/new_url';
  }
fsuuaas
  • 165
  • 7