From 21a3dabe1485c6e25e026a50f64368e4b50d6ca2 Mon Sep 17 00:00:00 2001 From: Waris Hafidz Date: Thu, 6 Apr 2023 08:20:25 +0700 Subject: [PATCH] Allow to specify input name Add input name filed with modifying the filepond ondata method. Refer to: https://pqina.nl/filepond/docs/api/server/#object-configuration --- src/Http/Controllers/FilepondController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/Controllers/FilepondController.php b/src/Http/Controllers/FilepondController.php index f48e9bf..7901ee3 100755 --- a/src/Http/Controllers/FilepondController.php +++ b/src/Http/Controllers/FilepondController.php @@ -34,7 +34,8 @@ public function __construct(Filepond $filepond) */ public function upload(Request $request) { - $input = $request->file(config('filepond.input_name')); + $inputName = $request->post('input_name') ?? config('filepond.input_name'); + $input = $request->file($inputName); if ($input === null) { return $this->handleChunkInitialization();