[FIXED] [#670] [3.1.0] [2.5.4] MultiUpload : Abort / AbortALL is not working

  1. #1

    [FIXED] [#670] [3.1.0] [2.5.4] MultiUpload : Abort / AbortALL is not working

    While testing the MultiUpload Control, while aborting an upload, the control keep uploading till all the file in the grid are uploaded. Is it a normal behavior or there is some missed attibute. The above scenario is also tested on Ext.net Examples online ?
    Last edited by Dimitris; Feb 10, 2015 at 12:43 PM.
  2. #2
    Hello, you should be fine if you add this script to your page:

            Ext.define("Ext.net.MultiUpload", {
                override: "Ext.net.MultiUpload",
                abortUpload: function (fileId) {
    
                    if (this.fileQueue[fileId].status == "started") {
    
                        switch (this.fileQueue[fileId].method) {
                            case "swfupload":
                                this.swfUploadStopped = true;
                                this.multiUpload.cancelQueue(); //this.multiUpload.stopUpload();
                                break;
    
                            case "dnd":
                                this.fileQueue[fileId].upload.xhr.abort();
                                break;
                        }
    
                        this.fileQueue[fileId].status = "aborted";
                        this.fireEvent("uploadaborted", this, this.fileQueue[fileId]);
                    }
                }
            });
    Technical stuff ahead :)

    Ext.NET has a custom code for the scripts after the stock code (from MultiUpload authors) that breaks the 'stop' in an attempt to display a nice 'cancelled' in the list. So it creates a 'cancelQueue' that effectively cancels everything in the queue, and overwrites the 'stopQueue' original command so that it fails if called alone.

    The result of the override above is that, all files that have not been already uploaded will have their status changed to 'cancelled'. When you click again to start the upload, their upload will be resumed as expected. There's just a strange behavior on the order they are resumed back, but, nothing blocking at all.

    As an alternative to the fix, you could also just add the original javascript for multiupload on your page, the result you'll get is, when you click 'Abort all', that the uploads are just aborted and the files keep at the 'queued' status. The resume goes smoothly in the files order, in contrast to the easier solution.

    As a base to investigate this issue I used this example: MultiUpload > Basic > Grid.
    Last edited by geoffrey.mcgill; Feb 07, 2015 at 1:42 AM.
  3. #3
    I've just created an issue on GitHub for this problem: #670


    In a while we'll be publishing the fix thru SVN and I return back here to inform you.
    Fabrício Murta
    Developer & Support Expert
  4. #4
    Hello, with a huge help from Daniil, I could make it to this fix. Well, we.

    Now, the solution I proposed at jan 15th is applied to Ext.NET versions 2 and 3 as follows:
    v2: revision 6297 (branches/2). It goes to 2.5.4.
    v3: revision 6298 (trunk). It goes to 3.1.0 beta.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. MultiUpload Progress Bar not working
    By GKG4 in forum 2.x Help
    Replies: 5
    Last Post: Oct 06, 2014, 1:39 PM
  2. Simple MultiUpload not working on IE9 (Windows 7)
    By xtremexploit in forum 2.x Help
    Replies: 1
    Last Post: Oct 28, 2013, 9:02 AM
  3. Replies: 6
    Last Post: Nov 15, 2011, 2:02 AM
  4. Gridpanel Abort Transcation Error-urgent
    By gopikrishna in forum 1.x Help
    Replies: 0
    Last Post: Feb 15, 2011, 9:22 AM
  5. Abort TreeNode!
    By lily in forum 1.x Help
    Replies: 0
    Last Post: Apr 20, 2009, 12:03 PM

Tags for this Thread

Posting Permissions