Can you try if this works in your view file?
storage_path('app/logos/Abc/logo.jpg')
if not
Storage::local('app/logos/Abc/logo.jpg');
I am using Laravel 5.4. I am creating organizations; whose details include a logo.
The intention is when a user for the organization logs in, the logo is on the display.
I am able to upload and save the logo on storage/app/logos/organization_name/logo... eg storage/logos/Abc/logo.jpg
However, I am not able to pick and display the image/logo for an organization. I have gone through the docs https://laravel.com/docs/5.3/requests#retrieving-uploaded-files but still struggling.
Kindly someone save my day.
Image Upload and save code below:
$org_image = $request->org_image;
if ($org_image !== null) {
$fileext = $org_image->getClientOriginalExtension(); //Get file extension
$org_image->storeAs('logos/' . $organization_name, "logo.{$fileext}"); //save file
}
How do I fetch and display this on the view diffentiating by the organization name?
Regards.
This is how I was able to achieve this, well just in case some one else is struggling.
I changed my default disk on the file system to public i.e. (`app/config/filesystem.php)
Then created a symbolic link app/storage/app/public to app/public/storage
This enabled me to access all files on app/public/storage ....
To access the logos on the view I used
img src="APP_URL/public/storage/logos/logo.png"
Thank you guys for the assistance .... About this and more here => https://laravel.com/docs/5.4/filesystem#the-public-disk
Please or to participate in this conversation.