Running uploadStoredFiles() in a submitted event for an added file doesn't add that file to the upload queue.
If I add files to fine uploader and run uploadStoredFiles(), then add one other file and in the submitted event for that file I run uploadStoredFiles() again, that file won't be added to the upload queue. So when the original files finish uploading, the file that is last added won't start it's upload and will have a status of undefined.
I think that when the submitted event runs, the file that it references must already have a SUBMITTED status and must be ready to be added to the upload queue.
Why are you invoking uploadStoredFiles inside of a callback?
Is there any other way to add a file to the upload queue?
What are you trying to do here exactly? Why are you using manual upload mode (autoUpload: false) in the first place? Where is this file you want to add to the "queue" coming from?
I add files with addFiles() to the uploader. I run uploadStoredFiles() and then I run addFiles() again while the previously added files are uploading and I want to add the new files to the upload queue so they begin uploading automatically after the original files are done.
Could I maybe temporarily enable autoUpload and then disable it after all the uploads are done?
Why don't you just set the autoUpload option to true (the default)? Then there is no need to ever call uploadStoredFiles.
Because I don't want the files to be uploaded automatically.
What logic are you using to determine when the files should be uploaded then? It's not clear from your explanation why you wouldn't want the files to be uploaded automatically.
If currently uploading is in progress newly added files should be added to the upload queue.
Please show me your uploader code. I'm still not sure why you don't simply let Fine Uploader manage the uploads based on the number of open connections.
As I already said, I don't want to upload files automatically, but if files are being uploaded and other files are added to the uploader, then add the new files to the upload queue so they can also be uploaded.
When autoUpload is set to false, Fine Uploader doesn't actually add the file to the internal list of "stored" files until after the onSubmitted callback is invoked. I'd have take some time to examine the related commits to determine why that is.
It probably makes sense to store the file internally if autoUpload is set to false before we invoke the onSubmitted callback (but after onSubmit). The rules are a bit different when autoUpload is set to true though. In that case, I think the current internal order of events is appropriate.
Will probably look into this as part of 5.2.3.
chore(build): inc build num
@KRTac @bjornbos The fix for this is currently being staged in the develop branch as part of 5.3.0-5. Please let me know if this fixes your issue.
Fixes it for me
fix(manual-upload): submitted file not avail for upload in onSubmitted