Dropzone – Uncaught Error: No URL provided

No URL provided happens when a Dropzone gets attached to an object without either:

  • an action attribute on a form that tells dropzone where to post
  • a configuration for specific dropzone

My bet is, that you have a race condition, where Dropzone attaches itself to an element before you configured it. Make sure that your configuration is either directly after the JS import, or that you set Dropzone.autoDiscover = false; and instantiate the Dropzone explicitly.

Take a look over here for more information.

<script src="{% static "dropzone/dropzone.js" %}"></script>

<script type="text/javascript">

   Dropzone.autoDiscover = false;

   $(document).ready(function () {
        $("#id_dropzone").dropzone({
            maxFiles: 2000,
            url: "/ajax_file_upload_handler/",
            success: function (file, response) {
                console.log(response);
            }
        });
   })
   
</script>

<form id="id_dropzone" 
      class="dropzone" 
      action="/ajax_file_upload_handler/"
      enctype="multipart/form-data" 
      method="post">
</form>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)