correction request input on upload
This commit is contained in:
parent
c515484670
commit
099b062215
|
@ -36,7 +36,11 @@ class ImagesController extends BaseController
|
||||||
'image' => 'required|file|image'
|
'image' => 'required|file|image'
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$image = new Image(['content' => $request->file('image')]);
|
$content = $request->file('image');
|
||||||
|
if (empty($content)) {
|
||||||
|
$content = $request->input('image');
|
||||||
|
}
|
||||||
|
$image = new Image(['content' => $content]);
|
||||||
$image->save();
|
$image->save();
|
||||||
|
|
||||||
return response()->json($image);
|
return response()->json($image);
|
||||||
|
|
Loading…
Reference in New Issue