SWFupload V2.1.0 : simple demo : bug (no alert message)

Hello everybody,

I have detected a bug in "V2.1.0 simple demo". First, replace :

"file_queue_limit : 0" by "file_queue_limit : 5"

Try to upload 6 files -> no alert is displayed !

Somebody have a correction ?

Thanks in advance.

Benoit

PS : test page : http://www.survoldefrance.org/essai/swfupload/demos/simpledemo/index.php

gyphie's picture

Known Issue

This has been fixed and is available in the SVN. The fix will be available in the next release.

Basically the 'unescapeFilePostParams' function doesn't check to see if the 'file' argument is not undefined before trying to work on it. Here is the corrected version:

SWFUpload.prototype.unescapeFilePostParams = function (file) {
var reg = /[$]([0-9a-f]{4})/i;
var unescapedPost = {};
var uk;

if (file != undefined) {
for (var k in file.post) {
if (file.post.hasOwnProperty(k)) {
uk = k;
var match;
while ((match = reg.exec(uk)) !== null) {
uk = uk.replace(match[0], String.fromCharCode(parseInt("0x"+match[1], 16)));
}
unescapedPost[uk] = file.post[k];
}
}

file.post = unescapedPost;
}

return file;
};

Thanks ! It's perfect

Thanks ! It's perfect !
Benoit