Opened 5 years ago

Last modified 3 years ago

#11902 new defect

Fileuploader uploads files in reverse order (flash multifile mode)

Reported by: vladar Owned by: mwilcox
Priority: high Milestone: 2.0
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 (6)

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 4 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.

Note: See TracTickets for help on using tickets.