Codeigniter 3 File Upload Issue |
View File
Code: <form id="DocUploadForm" action="" method="post" enctype="multipart/form-data"> JS File *i am using jquery validate to validate the form Code: $("#DocUploadForm").validate({ Code: $config['upload_path'] = './assets/'; I is always showing "file uoload failed". There is no permission issues. i have checked. Dont know the reason !! Thanks in advance for help. ![]()
Use this and see what is causing the problem
PHP Code: $this->upload->display_errors() This will get the error messages that where set by CI during upload PHP Code: if($this->upload->do_upload('pdocupload'))
Also you can check your browsers development tools and see what is going on for errors F12 key on most.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
it is showing
Code: <p>You did not select a file to upload.</p> Don't know why !! ![]()
Just a few things I would check.
Is the file of the allowed type? (I had jpg files called file.jpeg which caused an error) if $config['allowed_types'] case insensitive? What would happen if the file is called file.JPG Is the file upload limit in php.ini high enough? You set it in the config to 8048 but if in php.ini its still to 2M this will still fail Is max_post_size in php.ini high enough? I hope this helps.
On the package it said needs Windows 7 or better. So I installed Linux.
All Things I have Checked many times and those are fine.. My Issue is file is not uploading i guess. $_FILES has nothing..
Don't know why !! ![]() ![]() ![]()
Try removing the jquery validation from the form. It might be that the serialisation is stopping the form upload from working as a multi type form. Can you do a form upload test page without any js and see if you can upload a form then. If you can, the problem is the js. If you can't then at least you are starting to work out where the problem might be.
|
Welcome Guest, Not a member yet? Register Sign In |