I have used Input::file(\'upfile\')->getClientOriginalName() to retrieve name of uploaded file but gives name with extension like qwe.jpg.How do I g
Input::file(\'upfile\')->getClientOriginalName()
qwe.jpg
You could try this
$file = Input::file('upfile')->getClientOriginalName(); $filename = pathinfo($file, PATHINFO_FILENAME); $extension = pathinfo($file, PATHINFO_EXTENSION); echo $filename . ' ' . $extension; // 'qwe jpg'