I have a file stored in an s3 bucket. I can upload fine but when I try to download using the code below I get file not found exception thrown e.g.
Symfony\Component\HttpFoundation\File\Exception\FileNotFoundException
The file "https://s3.us-west-2.amazonaws.com/mybucket/puppy.jpg" does not exist
When I navigate to the same url in a browser, the file downloads fine.
This is my code:
return response()->download(Storage::disk('s3')->url($file->path), $file->name);
Any ideas what I'm doing wrong?