Closed afrasiyabhaider closed 4 years ago
In my case there is no hidden field named as file.
I want to access files in my controller but when is writedd($request->file());
it returns me null
I wrote following lines
use Sopamo\LaravelFilepond\Filepond;
$filepond = new Filepond();
$path = $filepond->getPathFromServerId($serverId);
I got error Undefined variable: serverId
Please tell me the solution
When I wrote dd($request->file());
it returns me an empty array.
When i wrote dd($request);
it returns me complete html of page in files array
How you get the serverId depends on your frontend implementation. Usually it's submitted in a hidden form input. You might get more information by calling dd($request->input());
which returns all given input variables to you.
It didn't displays any hidden field named as serverId
That probably is an issue with your frontend implementation then. There is really not a lot I can do to help with that. You should try to figure out why the serverId isn't submitted in your frontend form. As this library only takes care of the backend part, you would have to raise an issue with the frontend library if you are certain that your implementation is correct.
Please provide a more detailed description of your issue and/or look at this existing issue: https://github.com/Sopamo/laravel-filepond/issues/8