• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Uploading Zip Files

It was when there was a zip file with an exe in it when it clears all post data. Is that for security? Shouldn't it at least have an error saying what happened or something?

I have to admit, that didn't occur to me originally either, but now I think about it, it's kind of obvious. However, feel free to suggest it in the bugs forum.

Thanks for your help!

Just had this problem whereby CI not allowing upload of ZIP filetype. When I traced through the Upload.php library I noticed that for some reason the variable $this->file_type was "application/x-zip" (i.e. INCLUDING the quotation marks). Therefore it could not find it in the array of allowed mime types (which are without quote marks).

To solve, I just added another element to the array for 'zip' in the mimes.php config file that included the string with quotation marks.

Change line:
'zip'    =>  array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
To this:
'zip'    =>  array('application/x-zip', 'application/zip', 'application/x-zip-compressed', '"application/x-zip"'),

Thought it might help someone.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

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