CodeIgniter Forums

Full Version: upload RAR & ZIP in code igniter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2

El Forum

[eluser]loca[/eluser]
I can't upload Zip & rar files in CI, any ones helps me!!! SR about my English skill!

El Forum

[eluser]Dam1an[/eluser]
Have you added zip and rar to the allowed file types?
Code:
$config['allowed_types'] = 'zip|rar';

El Forum

[eluser]loca[/eluser]
I have added zip and rar to the allowed file types.
Code:
$config['allowed_types'] = 'rar|zip';
I've opened application/config/mimes.php
and added:
Code:
'rar'=> 'application/x-rar-compressed'
or:
Code:
'rar'   =>  array('application/x-rar','application/x-rar-compressed')
but it's still incorrect. I can't upload RAR and ZIP files!

El Forum

[eluser]Dam1an[/eluser]
Are you able to upload other ASCII and binary file types? Cause it could be a generic upload problem (eg folder permission etc)

El Forum

[eluser]loca[/eluser]
about folder permission: Right click on uploads folder and I've shared it on the network, allow users to change it.

I can upload file types: png, gif, txt... but I can't upload RAR and ZIP files.

El Forum

[eluser]loca[/eluser]
I've added the following code into mines file:
Code:
'rar'   =>  array('application/rar','application/x-rar','application/x-rar-compressed')

now, I can upload RAR files,

the following code is available in mines files by CI:
Code:
'zip'    =>  array('application/zip','application/x-zip', 'application/x-zip-compressed'),
but I can't upload ZIP.

Anybody there help me!!!!

El Forum

[eluser]barood[/eluser]
i have the same problem
any other extension is uploaded successfully but zip and rar always give error

any ideas ?

El Forum

[eluser]phused[/eluser]
There is a bug on CI's Upload Class, there are a few threads about it and a workaround.

El Forum

[eluser]barood[/eluser]
thank you phused for your reply
is there a temporary fix for this ?
i can't wait until the next CI release ...

El Forum

[eluser]codernow[/eluser]
I had this same problem and found a very easy solution.

My post here
Pages: 1 2