How can I have correct images
I have this file uploads with image display:
And below is how I switch around visibility and disk:
->visibility('public') only
1. On
ImageEntry
✅
2. On FileUpload
edit ❌ [403 (Forbidden)]
->disk('public') only
1. On ImageEntry
❌ // No error, just empty
2. On FileUpload
edit ✅
both ->disk('public') & ->visibility('public')
Same as ->disk('public') only
default (without disk and visibility)
1. On ImageEntry
✅
2. On FileUpload
edit ✅
ImageColumn
The image represents how ImageColumn
displays based on how we store, all are same and just string.
On my use case, I will need ->disk('public')
only because it set visibility to public as well, so how can I display correct images on panel
Or should I use default
(which display correct for infolist and form) and use temporaryUrl
for public facing app
Any advice is appreciate, thanks
3 Replies
What is disk public? Is it a local storage disk?
generally public facing apps get temporaryUrl when using cloud storage
add this ->disk('public'), also in .env 127.0.0.1:8000 instead of localhost
disk public is same as
FILESYSTEM_DISK=public
on .env, my apps will be very small and I will not need cloud storage yet..
I want to store images publicly so that I can show on frontpage easily. I'll try to override image display on panel or not show at some..