Forum

issues with filesystem->exists

I am having some issues when checking if file exists. This line returns list of all files in the "326965" directory located in S3 bucket:

$dd=$filesystem->disk('s3')->files("326965");

and 12.jpg is amongst others on the list. But if I want to check if one of the files exists:

$dd = $filesystem->disk('s3')->exists('326965/12.jpg');

I am getting false. It was doing the same thing when using local storage. When using PHP's file_exists function, I was correctly getting True (obviously can't use it on S3). Any idea why?

pawcio-g
pawcio-g
  • 2 years ago

Same here. Did you resolve it?