J
J
jazzus2019-04-29 21:06:57
Amazon Web Services
jazzus, 2019-04-29 21:06:57

How to show private image from Amazon s3 via Laravel Resource?

Image on Amazon. Private access. I am requesting the url of an image to insert into the img on the front. I am using Vue and Laravel Resource. I get the full url in the resource, I give it to the VUE component, but there is no access to the url. Because private. But I need private and I need it (therefore, setting public via put or setVisibility, as in the docks and in Google, does not suit me). Is it possible to access private through Laravel Resource and how?
$url = Storage::диск->url('file.jpg');

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-04-29
@jazzus

The question is not about laravel, but AWS. You can't do that. If you want to keep files private, then you have 2 options - download the file to your server and send it from there or signed urls (this is in Cloudfront)

V
vism, 2019-05-11
@vism

You can get a temporary link from the signed url directly through the laravel library.
Not Laravel's signed urls are directly Amazon's.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question