Search code examples
jquerydropzone.jsdropzone

Remove icon not appearing in dropzone


I am working with Dropzone in a Laravel project. I have successfully implemented it but the remove icon is not appearing after I upload an image.

<div class="">
  <div class="dropzone" id="dropzoneFileUpload"></div>
</div>
Dropzone.options.myAwesomeDropzone = {
  paramName: "file",
  addRemoveLinks: true,
  maxFilesize: 5, // MB
  init: function() {},
  accept: function(file, done) {},
  removedfile: function(file) {},
};

Solution

  • I can't be sure but maybe Dropzone is already initialised when you set the addRemoveLinks option. Can you try to do it while initialising like this (in your domReady):

    Dropzone.autoDiscover = false;
    var myDropzone = new Dropzone('#dropzoneFileUpload', {
        paramName: "file",
        addRemoveLinks: true,
        maxFilesize: 5, // MB
        init: function() {},
        accept: function(file, done) {},
        removedfile: function(file) {}
    }