CodeIgniter Forums
upload RAR & ZIP in code igniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: upload RAR & ZIP in code igniter (/thread-17954.html)

Pages: 1 2


upload RAR & ZIP in code igniter - El Forum - 04-20-2009

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


upload RAR & ZIP in code igniter - El Forum - 04-21-2009

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



upload RAR & ZIP in code igniter - El Forum - 04-21-2009

[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!


upload RAR & ZIP in code igniter - El Forum - 04-21-2009

[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)


upload RAR & ZIP in code igniter - El Forum - 04-21-2009

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


upload RAR & ZIP in code igniter - El Forum - 04-21-2009

[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!!!!


upload RAR & ZIP in code igniter - El Forum - 04-22-2009

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

any ideas ?


upload RAR & ZIP in code igniter - El Forum - 04-22-2009

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


upload RAR & ZIP in code igniter - El Forum - 04-23-2009

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


upload RAR & ZIP in code igniter - El Forum - 03-11-2010

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

My post here