The file is probably stored in the /storage/app/public directory. This directory has most of the time a symlink to the /public directory.
Documentation: https://laravel.com/docs/5.8/filesystem#the-public-disk
Hello! In laravel 5.7 app uploading file under storage
// $dest_image = "/page-contents/-page-content-1/1.png"
Storage::disk('local')->put($dest_image, File::get($page_content_file_path));
file is uploaded as
myapp/storage/app/page-contents/-page-content-1/1.png
Reading file I want to check if file exists and read it with all its props( size, width, height, system full path)
//$file_full_path= ‘page-contents/-page-content-1/1.png’
$file_exists = ( !empty($image) and Storage::disk('local')->exists( $file_full_path) );
I got false, but file really exists
$file_exists = ( !empty($image) and Storage::disk('local')->exists('public/' . $file_full_path) );
if shows true if file exists, but I am not sure if it a valid way ?
$image_full_path = storage_path( $image_path);
I got string “myapp/storage/page-contents/-page-content-1/1.png”, but it is without “/app/” as it was stored
I have all storage options default.
Which is valid way ?
Please or to participate in this conversation.