CodeIgniter Forums
upload file works fine on Firefox but not on Chrome - 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: upload file works fine on Firefox but not on Chrome (/showthread.php?tid=51384)



upload file works fine on Firefox but not on Chrome - El Forum - 05-02-2012

[eluser]Linh Pham[/eluser]
Hello,
i am getting a problem
i have a form to upload zip file, the form works fine on Firefox but not on Chrome, please help me to fix this problem, i dont know why it depends on the browser


upload file works fine on Firefox but not on Chrome - El Forum - 05-02-2012

[eluser]InsiteFX[/eluser]
Post your form code then maybe we can help you! Please use code tags for posting code.



upload file works fine on Firefox but not on Chrome - El Forum - 07-16-2012

[eluser]Linh Pham[/eluser]
Here is my code.
Please help me fix this problem,
i want my app is able to upload the zip file but currently it's just working on Firefox and not Chrome.


$config['upload_path'] ='uploads';
$config['allowed_types'] ='jpeg|jpg|png|gif|JPEG|JPG|PNG|GIF|zip|ZIP|RAR|rar|doc|DOC|txt|TXT|xls|XLS|ppt|PPT|pdf|PDF|docx|xlsx|pptx';

$config['max_size'] = 1024;
$config['encrypt_name'] = TRUE;
$config['remove_spaces'] = TRUE;
$this->load->library('upload', $config);
if ($this->upload->do_upload('attachment'))
{

$this->upload->data();
return true;
} else {

return false;
}