dropify icon indicating copy to clipboard operation
dropify copied to clipboard

how can I change the preview programmatically?

Open deevannaveed opened this issue 7 years ago • 3 comments

I want to change the preview programmatically so that I can display the dropify in a modal and it show different preview image for each row ?

deevannaveed avatar Jan 29 '18 11:01 deevannaveed

I have tried this but it didn't work let me know if any solution is found.

$('.dropify').dropify({
     defaultFile: 'process/uploads/staff_152192142429093.jpg',
});

PeterTough2 avatar Mar 24 '18 20:03 PeterTough2

Hi, This code is work for me.

var filedropper = $('#file_machine_front').dropify(); filedropper = filedropper.data('dropify'); filedropper.resetPreview(); filedropper.clearElement(); filedropper.settings['defaultFile'] = 'uploads/image/test.jpg'; filedropper.destroy(); filedropper.init();

pratakr avatar Apr 23 '18 03:04 pratakr

Hi, This code is work for me.

var filedropper = $('#file_machine_front').dropify(); filedropper = filedropper.data('dropify'); filedropper.resetPreview(); filedropper.clearElement(); filedropper.settings['defaultFile'] = 'uploads/image/test.jpg'; filedropper.destroy(); filedropper.init();

I had tried several ways for two days, none of them did work.. But your solution was helpful.. Thank you very much..

dareshiri avatar May 03 '19 10:05 dareshiri