lundi 24 août 2020

upply plugin to delete file from database in laravel

i try but only delete in preview section in database not remove so how can i remove from database also here is my code

$(document).on('click', id + ' .kt-uppy__list .kt-uppy__list-remove', function () {
                var itemId = $(this).attr('data-id');
                var path = $(this).attr('data-path');

                var index = filelist.indexOf(path);
                if (index > -1) {
                    filelist.splice(index, 1);
                }
                $('#filenamelist').val(filelist);
                console.log(filelist);
                //uppyMin.removeFile(itemId);
                $(id + ' .kt-uppy__list-item[data-id="' + itemId + '"').remove();

});


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire