如何获取存储文件夹中存储的文件的文件大小?$fileFullPath导致正确的路径,但$size = Storage::size($fileFullPath)引发异常:File not found at path。
public function getFromStorage()
{
$contents = Storage::disk('local')->get('txtFiles/file.txt');
$fileFullPath = Storage::disk('local')->path('txtFiles/file.txt');
$size = Storage::size($fileFullPath);
dd( $fileFullPath) // return correct path
dd( $size) // return file not found
}
Run Code Online (Sandbox Code Playgroud)