Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

nWidart's avatar

Storage::url() to amazon s3 is in wrong format

Hello,

I have a media management app that worked with s3.

I can upload files on s3 without issues, however, when calling the Storage::disk('s3')->url() method it doesn't generate the correct url.

It generates the following:

https://asgard-modules-dev.s3-eu-west-1.amazonaws.com//assets/media/laracon2015.jpg

Yet the correct url is:

https://s3-eu-west-1.amazonaws.com/asgard-modules-dev/assets/media/laracon2015.jpg

Am I missing something obvious?

Thanks,

0 likes
2 replies
nWidart's avatar

Hello,

You're correct, it's just the double slash causing the issue. I didn't think of that, since the s3 UI gives the second url in its ui.

1 like

Please or to participate in this conversation.