Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
600
Cancelling the fileUploading event handler in the ClientSideEvents.html sample
posted

I am using the igUpload jquery upload sample (2011.2\jQuery\Samples\Samples\igUpload\Display\ClientSideEvents\HTML\ClientSideEvents.html) and have tailored this to cancel the fileUploading event as follows (the only change to the sample code is marked in bold):

fileUploading: function (e, args) {
                                        var message =
                                            "<div class='event-fired'>fileUploading " +
                                                "event fired, with file arguments:" +
                                            "</div>" +
                                            "<div class='event-args'>" +
                                                "File ID: " + args.fileId + "<br />" +
                                                "File Path: " + args.filePath + "<br />" +
                                                "File Status: " + args.fileStatus + "<br />" +
                                                "TotalSize: " + args.totalSize + "<br />" +
                                                "Uploaded Bytes: " + args.uploadedBytes +
                                            "</div>";
                                        showEvent(message);
                    return false;
                },

The documentation (http://help.infragistics.com/NetAdvantage/jQuery/Current/CLR4.0) states that this should cancel the event. However, with this change, I still witness the fileSelected event being fired.

I would expect (and desire) this cancellation to stop uploading the file, reset the progress bar and not to call the fileUploaded event handler.

I suspect this error is not down to usage as cancellation of the fileSelecting event works as expected.

Can you confirm how I attain the behaviour I require?

Parents Reply Children
No Data