Open bahadorfarahani opened 5 years ago
in config/admin.php
file
'extensions' => [
'ckeditor' => [
'enable' => true,
'config' => [
'filebrowserImageUploadUrl' => '/image/upload', // your url
]
]
],
in your controller
public function upload(Request $request)
{
$image = $request->file('upload'); // get file
// response
$param = [
'uploaded' => 1,
'fileName' => 'fileName',
'url' => 'url'
];
return response()->json($param, 200);
}
can you teach me? I don't know how to use it...
in
config/admin.php
file'extensions' => [ 'ckeditor' => [ 'enable' => true, 'config' => [ 'filebrowserImageUploadUrl' => '/image/upload', // your url ] ] ],
in your controller
public function upload(Request $request) { $image = $request->file('upload'); // get file // response $param = [ 'uploaded' => 1, 'fileName' => 'fileName', 'url' => 'url' ]; return response()->json($param, 200); }
can you teach me? I don't know how to use it...
in
config/admin.php
file'extensions' => [ 'ckeditor' => [ 'enable' => true, 'config' => [ 'filebrowserImageUploadUrl' => '/image/upload', // your url ] ] ],
in your controller
public function upload(Request $request) { $image = $request->file('upload'); // get file // response $param = [ 'uploaded' => 1, 'fileName' => 'fileName', 'url' => 'url' ]; return response()->json($param, 200); }
/image/upload: This is your url to upload image file Ex: Route::post('image/upload', 'AdminController@ckEditorUpload')->name('admin.ck-editor.upload');
After this line: $image = $request->file('upload'); // get file, You need to upload $image and save it your server. After that, you need to get url of $image(ex: http://app-drug-store.local/uploads/ckeditor-files/97497750_548110366098944_8383231890651348992_n_1607828477.jpg) and file name: ex: 97497750_548110366098944_8383231890651348992_n_1607828477.jpg. Finally, you need push variable to $pram and return response
My same Issues, but responsive 404 file not found
Hi How to upload new image in ckeditor to server?