Closed a1lan1 closed 4 years ago
Hello! I want to send the form along with the pictures, on the server, to save the photos I use the Spatie/laravel-medialibrary.
My server code is:
public function store(Request $request) { $product = Product::create($request->all()); $product->addMediaFromRequest('images') ->toMediaCollection('images'); return response()->json($product); }
How can I send photos along with the rest of the data from the form to transfer them to the server and save as:
$product->addMediaFromRequest('images')->toMediaCollection('images');
Thanks!
Filepond works by uploading the images first, then submitting the form with the rest of your data and moving the files where they should be stored. See the Readme.
Closing due to inactivity
Hello! I want to send the form along with the pictures, on the server, to save the photos I use the Spatie/laravel-medialibrary.
My server code is:
How can I send photos along with the rest of the data from the form to transfer them to the server and save as:
$product->addMediaFromRequest('images')->toMediaCollection('images');
Thanks!