Skip to content

Set URL dynamically

enyo edited this page Dec 17, 2014 · 2 revisions

If you need to change the URL dropzone posts to dynamically for each file, you can use the processingfile event and change the options.url.

Example:

<form id="my-dropzone" action="/some-url" class="dropzone"></form>
<script>
Dropzone.options.myDropzone = {
  init: function() {
    this.on("processing", function(file) {
      this.options.url = "/some-other-url";
    });
  }
};
</script>