coco file upload widget returning file upload failed


I have used coco widget to create file upload. Previously i have created normal file upload, in yii correctly.

I have integrated the widget, Button is showing and file is auto saving but, after that it is showing failed.

Documentation says that we need to create a model to handle file upload, i have created model but, i don’t know, what code i should write inside model class.

Where i should write Cuploadedfile function and save function.

What model object i should use inside cuploadedfile function.

It looks like, it is not executing cocoaction class.