I have been reviewing the demos and documentation. I see that the ability to "Upload files in any order" is a feature as of v2. However, when I try out the Features Demo I see that the last file selected is the first listed in the queue. How does one control the order in which the files are uploaded? I need to upload the files in the order selected as I will then be renaming the files according to that order.
Here's the scenario I'm experiencing in the Features Demo:
I have 8 files; the file naming convention (just for this example) for all is "countdown(#).jpg", where "#" is an integer value from 0 - 7. In the "Select file(s) to upload by demo.swfupload.ord" dialog box I select them in sequential order from 0 - 7. However, the last file selected becomes the first in the list of file references within the "File name:" field... like this:
"countdown (7).jpg" "countdown (0).jpg" "countdown (1).jpg" "countdown (2).jpg" "countdown (3).jpg" "countdown (4).jpg" "countdown (5).jpg" "countdown (6).jpg"
The files then queue up as follows:
SWFUpload_0_0: 0%:countdown(7).jpg
SWFUpload_0_0: 0%:countdown(0).jpg
SWFUpload_0_0: 0%:countdown(1).jpg
SWFUpload_0_0: 0%:countdown(2).jpg
SWFUpload_0_0: 0%:countdown(3).jpg
SWFUpload_0_0: 0%:countdown(4).jpg
SWFUpload_0_0: 0%:countdown(5).jpg
SWFUpload_0_0: 0%:countdown(6).jpg
In reality the file names could be anything, I just need to make sure that they upload in the order selected by the user.
OS issue
This is an OS issue and there is nothing we can do about it.
You can test this in any program that allows multiple files to be selected.
Basically it works like this:
And so the OS gives the files to us in that goofy order. We don't presume to guess what order the user meant.
If you want to sort the uploads you'll have to sort and manage the queue yourself. This means you can't just call startUpload() but you have to call startUpload(file_id) with the File ID you want to upload next. You'll also have to handle re-sorting the display (since by default fileQueued just first in the order the OS gives us without any sort).