marktimbol's avatar

Help with Amazon S3

Hi everyone,

So I started to use S3 on my app. I can successfully upload an image to my S3 bucket. Now I want to display the image on the page. I know Laravel provides this Storage::get($file) method but it gives only the raw string content of the file (from the docs).

How can I get the url of the image to be able to display it on the page?

Thank you!

0 likes
2 replies
Snapey's avatar

It would be quite slow to serve all images through scripts. if it's only one or two per page then you might get away with it. A the alternative is to put a link to the file in s3 on your page. You will need to make the bucket publically readable though.

Please or to participate in this conversation.