Opened 3 years ago

Last modified 20 months 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:

Description

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();
    this.workingFiles.push(_loc_2);
    if (this.files.length == 0)
    {
       this.isLastFile = true;
    }
    _loc_2.lastUploadTime = param1;
    _loc_2.doUpload(this.uploadURL, this.fieldName);
    return;
}// end function

Change History (6)

comment:1 Changed 3 years ago by vladar

I have just ensured that changing "pop" to "shift" in function uploadNext in UploadList.as fixes the issue (recompiled uploader.swf using http://svn.dojotoolkit.org/src/deft/trunk/ and uploader works properly now).

Will it be possible to include in 1.5.1?

comment:2 Changed 3 years ago by mwilcox

  • Milestone changed from tbd to 1.5.1

comment:3 Changed 3 years ago by dante

  • Milestone changed from 1.5.1 to 1.6

comment:4 Changed 3 years ago by dante

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

comment:5 Changed 3 years ago by bill

  • Milestone changed from 1.6 to 1.7

punting new-ish 1.6 tickets to 1.7

comment:6 Changed 20 months 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.