I am not creating a Dropzone form, but a div and then i configure it using JavaScript and Jquery.
Anyone can explain me how do i configure my DropZone to hide the files information, name and size?
I am not creating a Dropzone form, but a div and then i configure it using JavaScript and Jquery.
Anyone can explain me how do i configure my DropZone to hide the files information, name and size?
Share Improve this question edited Dec 14, 2017 at 14:47 Saqib Omer 5,4777 gold badges53 silver badges73 bronze badges asked Dec 14, 2017 at 13:38 onii-chanonii-chan 152 silver badges6 bronze badges1 Answer
Reset to default 4From the docs:
The HTML that is generated for each file by dropzone is defined with the option previewTemplate which defaults to this:
<div class="dz-preview dz-file-preview">
<div class="dz-details">
<div class="dz-filename"><span data-dz-name></span></div>
<div class="dz-size" data-dz-size></div>
<img data-dz-thumbnail />
</div>
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
<div class="dz-success-mark"><span>✔</span></div>
<div class="dz-error-mark"><span>✘</span></div>
<div class="dz-error-message"><span data-dz-errormessage></span></div>
</div>
Just set the previewTemplate option to the above HTML but with .dz-filename
and .dz-size
elements removed.
The template you want is probably:
<div class="dz-preview dz-file-preview">
<div class="dz-details">
<img data-dz-thumbnail />
</div>
<div class="dz-progress"><span class="dz-upload" data-dz-uploadprogress></span></div>
<div class="dz-success-mark"><span>✔</span></div>
<div class="dz-error-mark"><span>✘</span></div>
<div class="dz-error-message"><span data-dz-errormessage></span></div>
</div>