Metadata
- Source
- FLUID-2459
- Type
- Sub-issue
- Priority
- Blocker
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Eli Cochran
- Reporter
- Justin Obara
- Created
2009-04-01T16:13:48.000-0400 - Updated
2009-04-07T16:10:12.000-0400 - Versions
- N/A
- Fixed Versions
-
- 1.0
- Component
-
- Uploader
Description
Removing files from the file queue throws an error
Steps to reproduce:
1) Open either the server or the demo version of uploader
http://build.fluidproject.org/infusion/components/uploader/html/Uploader.html
http://build.fluidproject.org:8080/sakai-imagegallery2-web/site/BrowseImages/
2) Add files to the file queue
3) Remove a file from the file queue
Notice that an error is thrown
Error: that.queue.currentBatch is undefined
File: SWFUploadManager.js
Line: 292
Attachments
Comments
-
Eli Cochran commented
2009-04-01T20:35:41.000-0400 Interesting bug. Pretty sure that the fix is to move the offending line (292):
that.queue.currentBatch.totalBytesUploaded += file.size;
inside the else clause so the method becomes:
that.events.onFileError.addListener(function (file, error) {
if (error === fluid.uploader.errorConstants.UPLOAD_STOPPED) {
that.queue.isUploading = false;
} else if (that.queue.isUploading) {
that.queue.currentBatch.totalBytesUploaded += file.size;
that.queue.currentBatch.numFilesErrored++;
}
fileStatusUpdater(file);
});However, I'm going to sleep on it.
-
Justin Obara commented
2009-04-02T08:52:30.000-0400 Not sure if this will help or not, but the error doesn't occur if the upload button has been pressed. So if you start and stop an upload or let it complete and then add more files, removing files from the queue won't throw the error.
-
Justin Obara commented
2009-04-02T14:53:42.000-0400 Will require a full set of QA tests after it is resolved.
-
Eli Cochran commented
2009-04-03T12:56:16.000-0400 The FLUID-2459.a.patch is exactly the fix outlined above. Tested on the server and demo versions.
-
Colin Clark commented
2009-04-03T17:34:41.000-0400 I have reviewed Eli's patch and it is correct. I tested it on the following platforms and it checks out:
Demo Uploader
Mac OS X: FF 2, Safari 4 beta
Windows: FF 2, IE 7I'm having trouble with my server version, so perhaps someone else can give it a try?
-
Eli Cochran commented
2009-04-03T18:03:04.000-0400 I ran it on my local server and it worked well... but then I wrote the patch so I don't count. 😉
-
Colin Clark commented
2009-04-06T14:48:06.000-0400 I've since tested it on a server build and it's working great. +1 for including this in 1.0
-
Justin Obara commented
2009-04-07T16:10:12.000-0400 Verified fix using:
FF2, FF3, Opera 9.6, Safari 3.2 (Mac OS 10.5)
Safari 3.2 (Mac OS 10.4)
FF2, FF3, IE6, IE7, Opera 9.6 (Win XP)
FF3, IE7 (Win Vista)
IE6 (Win 2000)