innostudio / fileuploader

Beautiful and powerful HTML file uploading tool. A jQuery, PHP and Node.js plugin that transforms the standard input into a revolutionary and fancy field on your page.
141 stars 25 forks source link

How to stop execution after delete or if any error occurred ,it keep going inside 'sorter' on_sort callback #25

Closed baadhshah closed 5 years ago

baadhshah commented 6 years ago

We have appended files and doing sorting, But When we upload any invalid image or invalid no. of images, then user get error alert,after that, it goes inside onSort callback (Look like a bug) :- Sorting Section Is Given Below :-

'sorter'=> array( 'onSort'=> "js:function(list, listEl, parentEl, newInputEl, inputEl) { updateListingIndex(list); }" ), And Remove/delete file section is given below :-

'onRemove' => "js:function(item){
$.ajax({ url : '/sell/ImageDelete', data: { 'image_value' : item.data.image_value, 'listingId' : '$listingId' }, method: 'POST', success :function (result) { data = JSON.parse(result); if(data.result != '1') { $('.ListingImage-error').html(data.error); } } });
}", I believe there is no point of calling sort function after error happens,It looks like a bug, return false is not working, Please Please Provide Your suggestion

innostudio commented 5 years ago

@baadhshah thank you for your report. The issue is fixed now in the last version: https://innostudio.de/fileuploader/documentation/#changelog