yulianto saparudin
yulianto saparudin

Reputation: 249

How to place dropzone thumbnail outside dropzone preview template

I know this is a stupid question but anyone know how to place dropzone thumbnail outside dropzone previewTemplate

<div class="template">
   <div class="previews">
   </div>
</div>
<!-- this is previewTemplate area -->

<div class="image-profile">
  <img data-dz-thumbnail>
</div>
<!-- this is thumbnail preview area, outside from previewTemplate -->

Is it possible to do this? or have a another possible way?

or maybe how to get dropzone thumbnail source, something like this enter image description here

Upvotes: 0

Views: 1544

Answers (1)

progrAmmar
progrAmmar

Reputation: 2670

On Upload complete try

//.each because there can be multiple thumbnails in case of multiple uploads
$('img[data-dz-thumbnail]').each(function(i, img){
    var imgSrc = $(this).attr('src');
    console.log(imgSrc);
});

Upvotes: 1

Related Questions