Help with... Storage::disk('s3')->url($media->file);
I am trying to get the URL for a file I uploaded to s3 (using code).
Everything I'm reading indicates that this should work:
$media->path = Storage::disk('s3')->url($media->file);
But the url() method isn't valid.
Any ideas? I'm on Laravel 8/
@kvnkrft what does an invalid url() means?
Do you have set the correct url in your config/filesystems.php file:
under s3 you should have:
'url' => env('AWS_URL'),
then in your .env file you should have the base pat to your S3 instance.
Thanks for your reply.
I suppose it was just an issue with Visual Code, showing ->url() as invalid.
I was pretty sure I tested it, and it failed, but now it's working. Strange.
Please or to participate in this conversation.