agile_uploader icon indicating copy to clipboard operation
agile_uploader copied to clipboard

Error 2101 trying to submit file when "formId" option is empty

Open phgrey opened this issue 13 years ago • 2 comments

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.

phgrey avatar Nov 15 '11 13:11 phgrey

Thanks phgrey that works great

planetClaire avatar Mar 08 '12 07:03 planetClaire

Good solution - thank you.

chriskeeble avatar Oct 18 '12 15:10 chriskeeble