When a new file is created with private visibility, or an existing file visibility is set to private, the file visibility is still public and it is still accessible from the browser.
1- Create a new private file in 'storage/app'
use Illuminate\Support\Facades\Storage;
Storage::put('file.txt', 'contents', 'private');
2- Get its visibility
Storage::getVisibility('file.txt');
3- Output
public
'public' => ['driver' => 'local','root' => storage_path('app/public'),'url' => env('APP_URL').'/storage','visibility' => 'private',],Visibility is only for cloud filesystems AFAIK.
The visibility flag is only for cloud filesystems lik S3 or Dropbox.
Well thank you for making this clear.
Most helpful comment
The visibility flag is only for cloud filesystems lik S3 or Dropbox.