I have a form
that makes uploads
of images, when I upload, the path is saved in the bank by the path
field, I recover that image and set it in a array
image
this.image = data;
Now how can I display this image in a HTML
using the
image.path
??
<img src="{{ image.path }}">
I tried this and it did not work
Image controller code
$filename = $file->store("uploads/{$idCampaign}/images");
if (!$agency) { throw new NotFoundHttpException('agency_not_found'); }
if ($filename) {
$image->file_extension = $file->getClientOriginalExtension();
$image->filename = $file->getClientOriginalName();
$image->path = $filename;
$result = $this->service->save($image);
$img = new ImageCampaign();
$img->setCampaign($campaign);
$img->setImage($image);
$img->setAgency($agency);
$img->fill($request->post());
$this->imageCampaignService->save($img);
DB::commit();
return response()->json($result);
This code inserts the image into the bank