tmaiaroto/agile_uploader — Issue #1: Error 2101 trying to submit file when "formId" option is empty
Author: phgrey
Created: 2011-11-15 13:39:12+00:00
State: open

Trying to reproduce the step:
Chrome 15.0.874.106, player 11.0.1.152 (debian squeeze, I hope You do not need my kernel version)

Here is my js:
$('#single').agileUploaderSingle({
flashSrc: '/agile-uploader/agile-uploader.swf',
progressBarColor: '#548fd1',
flashWidth: 121,
flashHeight: 28,
flashVars: {
firebug: true,
form_action: 'uploader.php',
button_up:'/images/button-gray.png',
button_over:'/images/button-blue.png',
button_down:'/images/button-blue.png',

return_submit_response: true,
}
};
U can see that I do not have entered "formId" parameter.
When trying to upload file I can see Error 2101 in console.
I've changed a js a little to get it works -
$.fn.agileUploaderSerializeFormData = function() {
if((typeof(opts.formId) == 'string') && ($('#'+opts.formId).length > 0)) {
return $('#'+opts.formId).serialize();
}
return false;
}
I've replaced return value in this function, so for now it looks like
$.fn.agileUploaderSerializeFormData = function() {
if((typeof(opts.formId) == 'string') && ($('#'+opts.formId).length > 0)) {
return $('#'+opts.formId).serialize();
}
return '';
}
And it works.
Because as I see in Main.as, line 530 You do not test 'false' value, only 'null' and ''.
Thanks.