• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upload RAR & ZIP in code igniter

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

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

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

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

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

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

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

any ideas ?

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

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

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

My post here


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.