I am trying to display the image from the file path but it's seeing a different thing entirely, I'm vague of what to do. I am using dropzone. The images are stored in this directory laravel/public/gallery/images
. so the url is thus: http://localhost:port/gallery/images
. The images are saved in the db successfully but displaying them is an issue. This is the code to display:
<TR><TD>
<DIV class="row">
<DIV class="col-md-12">
<DIV id="gallery-images">
<ul>
@foreach($productVerificationValidation->productDocumentUpload as $productDocument)
<li>
<a href="{{url($productDocument->file_path)}}./.{{$productDocument->file_name}}" target="_blank">
<img src="{{url($productDocument->file_path)}}">
</a>
</li>
@endforeach
</ul>
</DIV>
</DIV>
</DIV>
</TD></TR>
This is the controller to display the view:
public function viewUploadedDocuments($id=null){
$productVerificationValidation = ProductVerificationValidation::findOrFail($id);
return view('product.verification-validation.viewDocuments')->with('productVerificationValidation', $productVerificationValidation);
}
To my surprise when i check the console on Chrome, instead of getting the properties of the images it returns wrong properties as displayed on the screenshot: but the db record has a different property as displayed on the screenshot: what wrong am I to make right, Please help out.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire