Optional file upload |
first question:
Why the file upload in COdeigniter is not optional so that I need to make a trick? Second one: In this code below If I select a file it says "You did not select a file to upload." and doesn't upload. I have title,text,date and file fields in the form. If I don't select a file there is no problem. Can you help me solve that? PHP Code: public function create()
This is a shot in the dark, but did you use form_open_multipart() in your view, or just form_open()?
PHP Code: <?php if (isset($error)) echo $error;?> Yes I had.
Try changing $this->upload->do_upload() to $this->upload->do_upload('dosya')
thank you for help. solved now.
I changed the upload path to $config['upload_path'] = dirname($_SERVER["SCRIPT_FILENAME"]).'/files/makaleler/'; |
Welcome Guest, Not a member yet? Register Sign In |