Level 122
Because you did not provide an extension? Try changing 'croppedImage' to 'croppedImage.png' ?
I am using Laravel 5.3,
I crop an image via javascript on the front end and upload it to back end via ajax,
The headers is like this:
And dd() the image:
public function changeAvatar(Request $request)
{
$file = $request->file('croppedImage');
dd($file);
}
But,dd() the extension of the image:
public function changeAvatar(Request $request)
{
$file = $request->file('croppedImage');
$extension = $file->getClientOriginalExtension();
dd($extension);
}
The result is ''.
Why is it ?
Please or to participate in this conversation.