Upload Zip/unzip File

hi! how to upload zip/unzip file!

As we do upload images or any other file…

Check http://www.yiiframework.com/wiki/2/how-to-upload-a-file-using-a-model

In rules change the type

    public function rules()


        return array(

            array('zipfile', 'file', 'types'=>'rar,zip,tar'),



follow the same procedure you would do with a image any other file here is a link might help you


Yes! I can upload now but maxsize not working this is my rules!

array(‘zipfile’,‘file’,‘types’=>‘rar,zip,tar’,‘allowEmpty’=>true, ‘on’=>‘update’,‘maxSize’=>‘25000’),

I can only upload 1Mb.

it only checks that size on update

Do you Know about unzip when you upload it?