setu setu - 6 months ago 139
Javascript Question

Dropzonejs without Form

Is there any way to use Dropzone js without using Form.
I want to use like following.But in this way image preview is not showing.

<div class="dropzone" id="dropzoneForm">
<div class="fallback">
<input name="file" type="file" multiple/>


Read more through in the docs and it will explain many problems people faces these days.. Anyways Here is the solution to your problem:

<!DOCTYPE html>
<html lang="en">

    <link rel="stylesheet" href="css/basic.css" />
    <link rel="stylesheet" href="css/dropzone.css" />
    <script src="dropzone.min.js"></script>
      var myDropzone = new Dropzone("div#myId", {
        url: "/file/post"
        url: "/file/post"


    <div class="fallback" class="dropzone">
      <input name="file" type="file" multiple />

What im doing here is giving the div a url to link to so you dont have to use a form!