danielm / uploader

A lightweight and very configurable jQuery plugin for file uploading using ajax(a sync); includes support for queues, progress tracking and drag and drop.
https://danielmg.org/demo/java-script/uploader
MIT License
1.17k stars 384 forks source link

upload goes on if onBeforeUpload returns false #51

Closed talal424 closed 6 years ago

talal424 commented 7 years ago

the minified file doesn't return if onBeforeUpload returns false

these lines are forgotten in the minified version

var can_continue = widget.settings.onBeforeUpload.call(widget.element, widget.queuePos);

    // If the client function doesn't return FALSE then continue
    if( false === can_continue ) {
      return;
    }
danielm commented 6 years ago

Closing the issue. For future reference:

Yes this feature was only on git for testing and it was broken and was not finished.

Now this is available using the onNewFile callback, by returning false the file will be completely ignored by the plugin.