I'm trying to upload a file to a location but it create always a folder with the file name and put the file inside this folder.
For exemple: If we add a file name xpto.pdf it put the file into /location/xpto.pdf/xpto.pdf and i don't understand why it happens.
$directory = "\\SRVGDOC\GDOC\CSdefault21\group1\";
$fname = pathinfo(Input::file('file')->getClientOriginalName(), PATHINFO_FILENAME);
$fext = Input::file('file')->getClientOriginalExtension();
$fullname = $directory . $fname . '.' . $fext;
// $fullname = \\SRVGDOC\GDOC\CSdefault21\group1\xpto.pdf
Input::file('file')->move($fullname, $fname.'.'.$fext);
What can be the problem?
Thank you
$fullname = $directory . $fname . '.' . $fext;and then->move($fullname, $fname.'.'.$fext);?