When an image url is pasted, editor detects that and send the information back to /admin/media/fetchUrl route via POST method. Currently there is no handler for this route in the backend. The handler should receive the URL, download the file from the remote URL to the /storage/media directory and then send back the server URL of the downloaded file to the editor. Then Editor can display the image here. The response back to the editor should be in the below format.
return [ "success" => 1, # 0 for failure "file" => [ "url" => "server url of the image" ] ];
When an image url is pasted, editor detects that and send the information back to
/admin/media/fetchUrl
route via POST method. Currently there is no handler for this route in the backend. The handler should receive the URL, download the file from the remote URL to the/storage/media
directory and then send back the server URL of the downloaded file to the editor. Then Editor can display the image here. The response back to the editor should be in the below format.return [ "success" => 1, # 0 for failure "file" => [ "url" => "server url of the image" ] ];