CodeIgniter Forums
Uploading a .zip empty $_POST & $_FILES - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Uploading a .zip empty $_POST & $_FILES (/showthread.php?tid=50823)



Uploading a .zip empty $_POST & $_FILES - El Forum - 04-10-2012

[eluser]Unknown[/eluser]
Hello !

I'm actually working on a small project, and I just came across a small issue !

I'm trying to upload a .zip from a form, nothing complicated, really.

But when I try to upload the .zip, my post and files data are blank ! When I try to do the same with a .jpg or anything else, it's working perfectly.

Same result without sending any files, it's working properly.

Here are my files !

View : http://pastebin.com/JXVwVjQT
Controller : http://pastebin.com/zZjFCGap

I don't know if this is a bug, or if I can somehow fix my code (if it's my fault !), but I'm lost right now Sad

Thanks for your work !


Uploading a .zip empty $_POST & $_FILES - El Forum - 04-10-2012

[eluser]InsiteFX[/eluser]
Code:
if ($this->form_validation->run() == FALSE)
{
    // load your form view
}
else
{
    // process and redirect
}



Uploading a .zip empty $_POST & $_FILES - El Forum - 04-10-2012

[eluser]Unknown[/eluser]
Sorry... I don't mean to be rude, but I know that...

But how am I supposed to process an empty array ?

CI is blanking my data when I upload a .zip, it can be processed in any way Smile


Uploading a .zip empty $_POST & $_FILES - El Forum - 04-10-2012

[eluser]InsiteFX[/eluser]
Did you turn on error reporting?

Check an array for being empty!

Usally if it's a file and it is not being uploaded then, then it does not have enough memory and your php.ini file will need to be updated to reflect this!

Also why are you not using the CodeIgniter File Uploading Class?