Yii Framework Forum: Upload Zip/unzip File - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Upload Zip/unzip File Rate Topic: -----

#1 User is offline   roadrunner 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 74
  • Joined: 21-June 12

Posted 11 January 2013 - 04:54 AM

hi! how to upload zip/unzip file!
0

#2 User is offline   PeRoChAk 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 579
  • Joined: 26-November 10
  • Location:Lahore, Pakistan

Posted 11 January 2013 - 05:49 AM

As we do upload images or any other file...

Check http://www.yiiframew...e-using-a-model

In rules change the type

    public function rules()
    {
        return array(
            array('zipfile', 'file', 'types'=>'rar,zip,tar'),
        );
    }

Cheers
Perochak
Web Design - Logo Design - Application Development

My Blog | Forums Comparison
0

#3 User is offline   alirz23 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,102
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 11 January 2013 - 06:50 AM

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

http://www.yiiframew...-using-a-model/
0

#4 User is offline   roadrunner 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 74
  • Joined: 21-June 12

Posted 13 January 2013 - 11:45 PM

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.
0

#5 User is offline   alirz23 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 1,102
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 14 January 2013 - 12:58 AM

it only checks that size on update
0

#6 User is offline   roadrunner 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 74
  • Joined: 21-June 12

Posted 15 January 2013 - 10:51 PM

View Postalirz23, on 14 January 2013 - 12:58 AM, said:

it only checks that size on update

Do you Know about unzip when you upload it?
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users