dxheditor's image upload and CSRF error

Hello, I managed to add the csrf token to the form by adding this to the xheditor-en.src.js file:

jUpload.append('<input type=hidden name=YII_CSRF_TOKEN value=' + settings.csrf + '><input type="file"'+(upMultiple>1?' multiple=""':'')+' class="xheFile" size="13" name="'+uploadInputname+'" tabindex="-1" />');

Then did this to the widget call:

$this->widget("ext.dxheditor.DxhEditor", array(

    'htmlOptions'=>array('name'=>'teste','style'=>'width: 95%; height: 300px;',

        'id' => 'teste'),

    'options' => array( 'upImgUrl'=>'index.php?r=testImageUpload/upload', 'csrf' => Yii::app()->request->getCsrfToken()),


I can print the csrf in the dialog for uploading the image but I still get the "CSRF cannot be verified" when I try upload.

pokes the sleeping topic