Opened 10 years ago
Closed 5 years 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: | [email protected]… | |
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 (8)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Milestone: | tbd → 1.5.1 |
---|
comment:3 Changed 10 years ago by
Milestone: | 1.5.1 → 1.6 |
---|
comment:6 Changed 8 years ago by
Milestone: | 1.8 → 2.0 |
---|
1.8 has been tagged; moving all outstanding tickets to next major release milestone.
comment:7 Changed 5 years ago by
Owner: | changed from Mike Wilcox to dylan |
---|---|
Status: | new → assigned |
comment:8 Changed 5 years ago by
Milestone: | 2.0 → 1.11 |
---|---|
Resolution: | → patchwelcome |
Status: | assigned → 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 https://github.com/dojo/dojo/blob/master/CONTRIBUTING.md , we'll review and land it.
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?