Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array to string conversion error? #2

Open
vgavrilovikj opened this issue Jan 17, 2021 · 0 comments
Open

Array to string conversion error? #2

vgavrilovikj opened this issue Jan 17, 2021 · 0 comments

Comments

@vgavrilovikj
Copy link

vgavrilovikj commented Jan 17, 2021

I get 500 Internal Server Error on "/filepond/api/process" URL,

Array to string conversion in file PATH\vendor\cnviradiya\laravel-filepond\src\Http\Controllers\FilepondController.php on line 41

Also how should it hit my function update, with URL "/mentee/upload"

`namespace App\Http\Controllers;

use Illuminate\Http\Request;
use cnviradiya\LaravelFilepond\Filepond;

class ImageUploadController extends Controller
{
//
public function update (Request $request, Filepond $filepond) {
$path = $filepond->getPathFromServerId($request->input('mentee_image')); // Here upload_file is your name of your element
$pathArr = explode('.', $path);
$imageExt = '';
if (is_array($pathArr)) {
$imageExt = end($pathArr);
}
$fileName = 'mentee_image.' . $imageExt;
$finalLocation = storage_path('uploads/' . $fileName);
\File::move($path, $finalLocation);
}
}`

When in the filepond configuration in script, I have the following url "/filepond/api" ?

Can you please check this issue... Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant