It's possible validate a file attributes in AJAX submit?

Maybe because my little knowledges of english you not understand me…But I try.

I have an activeForm with one text field and a file field for upload.

I use CUploadedFile for validations on a Model.

All works fine when I click the regular submit button, a warning message appears when the extension is other than .jpg, .gif and another rules of validation.

Its possible to send a file via AJAX for validation and upload?

I have seen that are some extensions but I don’t like, they don’t use CUploadedFile or they are in Flash.