JeremyFagis/dropify

how can I change the preview programmatically?

deevannaveed opened this issue · 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 ?

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',
});

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();

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..