Welcome Guest, Not a member yet? Register   Sign In
File upload error
#1

(This post was last modified: 05-22-2021, 04:08 AM by pippuccio76.)

hi , i have an error with file upload :

The original file is not a valid file


when i leave empty the file field


this is my code : 
PHP Code:
                //recupero le informazioni del file
                $img $this->request->getFile('immagine');



                if($img){

                    //lo trasferisco nella cartella uploads
                    if($img->move(FCPATH '/uploades/images/foto_mezzi')){

                
                        $post
['immagine'] = $img->getName(); 

                            $res$mezzi_model->save($post); 
Reply
#2

Please, more details
Reply
#3

So check to see if the filename is empty, then handle the error.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB