Sopamo / laravel-filepond

Laravel backend module for filepond uploads
MIT License
203 stars 56 forks source link

ServerId Not found #12

Closed afrasiyabhaider closed 4 years ago

Sopamo commented 4 years ago

Please provide a more detailed description of your issue and/or look at this existing issue: https://github.com/Sopamo/laravel-filepond/issues/8

afrasiyabhaider commented 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

afrasiyabhaider commented 4 years ago

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

afrasiyabhaider commented 4 years ago

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

Sopamo commented 4 years ago

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.

afrasiyabhaider commented 4 years ago

It didn't displays any hidden field named as serverId

Sopamo commented 4 years ago

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.