Dropzone.js not working inside corner partial view

Dropzone js is a terrific drag and drop plugin. I want this implemented in my angularjs project.

Please find the script I tried

I turned on

<form id="my-awesome-dropzone" action="/target" class="dropzone"></form> 

inside a partial view, while the page itself in the browser tag is removed from the DOM.

When I include it in the index.html page, it works correctly. Please let me know how to make the dropzone work, inside a partial view of the corner part.

+5
source share
2 answers

I am facing the same problem. For playback, the dropzone selector new Dropzone('#selector') does not work as aspected by default templates. The selector does not work in asynchronous mode. downloaded views. There is an easy fix. Initiating a dropzone on the form will display the dropzone template correctly.

View

 <form id="dropzone-form" class="dropzone"></form> 

Javascript

 var myDropzone = new Dropzone('#dropzone-form', { url: "/file/post" }); 
+2
source

You mentioned that you included:

 <form id="my-awesome-dropzone" action="/target" class="dropzone"></form> 

The problem may be that you have included the above form β€œinside” another form.

0
source

Source: https://habr.com/ru/post/1210446/


All Articles