teguh_rijanandi's avatar

Call to a member function getClientOriginalName() on null

i am try to upload images, but my project was show this error code Call to a member function getClientOriginalName() on null

and then highlighted on $file = $request->file('gambar'); $fileName = $file->getClientOriginalName(); $request->file('gambar')->move("image/", $fileName);

note: gambar is image (Indoensian Language)

0 likes
1 reply
Cronix's avatar

Do you have

<form enctype="multipart/form-data">

on your form open tag? It doesn't appear your image is actually being uploaded.

Please or to participate in this conversation.