file upload with ajax

I want to create a form and use ajax for the action.

Also I want to upload a file (image) with this photo.

I use CHtml::ajaxSubmitButton for another form with mo file upload.

How I can do it (to upload a file with ajax) with Yii?I look at extensions but I did not find something so long.

Thank you

Ajax can’t control file uploading. You need to use a jQuery plugins or something hand made solution.

And if you are not so experienced, you need to learn more.

Please read next articles:

follow the links, and learn how it works. It work not with ajax, but user view a page, and it seems like form uses ajax.

Every plugin do similar things. There is a process of creating a hidden iframe and creating a new file element. Then submit this form to a srever. Then receives an answer and parse a content of hidden iframe.

Thank you for the replay,I found a jquery form plugin, but it make javascript errors for some reason (I use also CJuiDialog).

So maybe to try something by hand with jquery

i’ve done it by hand with jquery too