4

Dropzone js is an awesome plugin used for drag & drop upload. I want it to implement in my angularjs project.

Please find the scenario, which I have tried

I have included

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

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

When I include it in index.html page, it is working properly. Please let me know how to make dropzone working, inside angularjs partial view.

1
  • did you get an solution for this yet? Commented May 21, 2015 at 21:16

2 Answers 2

2

I run into the same problem. For reproduction, the dropzone selector new Dropzone('#selector') is not working as aspected on default templates. The selector fails on async. loaded views. There is a easy fix. Init dropzone on a form will enforce dropzone template rendering correctly.

View

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

JavaScript

var myDropzone = new Dropzone('#dropzone-form', {
    url: "/file/post"
});
Sign up to request clarification or add additional context in comments.

Comments

0

You mentioned that you included:

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

The issue may simply be that you included the above form "inside" another form.

1 Comment

This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post. Also check this what can I do instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.