Opened 5 years ago

Closed 3 weeks ago

#11902 closed defect (patchwelcome)

Fileuploader uploads files in reverse order (flash multifile mode)

Reported by: vladar Owned by: dylan
Priority: high Milestone: 1.11
Component: DojoX Uploader Version: 1.5
Keywords: Cc: vladimir.razuvaev@…
Blocked by: Blocking:


Files are uploaded in reverse order, when selecting multiple files at once with flash uploader.

E.g. I have a folder with files 1.jpg, 2.jpg, 3.jpg etc, ordered by name. When selecting all of those files, they are properly displayed in filesList (1.jpg, 2.jpg, 3.jpg), but uploaded in reverse order (3.jpg, 2.jpg, 1.jpg). deferredUploading is set to 1, so it shouldn't affect upload queue.

This is especially inconvenient wheh uploading photo albums, where sequence of photos is important.

Looks like uploader.swf acts as stack, not queue when uploading files.

I believe the problem is in method "uploadNext" in flash movie, which uses pop() method instead of shift():

private function uploadNext(param1:Number = 0) : void
    var _loc_2:* = this.files.pop();
    if (this.files.length == 0)
       this.isLastFile = true;
    _loc_2.lastUploadTime = param1;
    _loc_2.doUpload(this.uploadURL, this.fieldName);
}// end function

Change History (8)

comment:1 Changed 5 years ago by vladar

I have just ensured that changing "pop" to "shift" in function uploadNext in fixes the issue (recompiled uploader.swf using and uploader works properly now).

Will it be possible to include in 1.5.1?

comment:2 Changed 5 years ago by mwilcox

  • Milestone changed from tbd to 1.5.1

comment:3 Changed 5 years ago by dante

  • Milestone changed from 1.5.1 to 1.6

comment:4 Changed 5 years ago by dante

there will be no 1.5.1. 1.6b1 is cut, as of now.

comment:5 Changed 5 years ago by bill

  • Milestone changed from 1.6 to 1.7

punting new-ish 1.6 tickets to 1.7

comment:6 Changed 3 years ago by csnover

  • Milestone changed from 1.8 to 2.0

1.8 has been tagged; moving all outstanding tickets to next major release milestone.

comment:7 Changed 3 weeks ago by dylan

  • Owner changed from mwilcox to dylan
  • Status changed from new to assigned

comment:8 Changed 3 weeks ago by dylan

  • Milestone changed from 2.0 to 1.11
  • Resolution set to patchwelcome
  • Status changed from assigned to closed

My apologies that this was ignored for so many years.

Given that flash is quickly being abandoned as something that runs by default on the web, I'm going to mark this as patchwelcome. I know there's a patch. If you want to recreate as a pull request via github following the guidelines at , we'll review and land it.

Note: See TracTickets for help on using tickets.