Van1310
131
5
Laravel

Call to a member function getClientOriginalExtension() on null

Posted 1 month ago by Van1310

when i try submit data but skip file upload option then show this error

Call to a member function getClientOriginalExtension() on null

how to fix it any suggestion ?

$files=Input::file('resume');
    
$picName=str_random(30) . '.' . $files->getClientOriginalExtension();
    
$files->move(base_path() . '/public/resume/',$picName);

$registration=new Registration(array(            
    
          'resume'=>base_path() . '/public/resume/'. $picName,
            
    'date_registration'=>$request->get('date_registration'),
            
    'status'=>'Recently Added',            
        
));                       
        
$registration->save();

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.