1
I’m trying to make a folder inside the directory public Storage of Laravel, but I was unsuccessful. The folder to be made public is on the way:
project/storage/app/images
Yes, outside the public. I’ve tried to create the symblink usually with:
php artisan storage:link
And even created the link symbolic, but not yet obtained access to images.
Later I tried:
ls -l -s "project/storage/app/images" "project/public/"
Also unsuccessful.
You can redirect via
.htaccess
or configuration of Nginx. If you use any of them.– Valdeir Psr
I didn’t understand how htacess would help me, since the images are only in /app/images/ but I would like to know how :) Thanks for the reply!
– Anderson Amorim
If I understand correctly, you want to access
https://www.example/storage/app/images
and have access to the files in the folder/project/storage/app/images
. If so, in the Nginx and Apache you can use thealias
– Valdeir Psr
No, I can only display the images that are in admin/public in Laravel and, as is not the case, it is necessary to create something that allows such a thing...
– Anderson Amorim
Is your environment windows? Using something like a Vagrant machine?
– evandrobm
Ubuntu, not my friend.
– Anderson Amorim
With Storage:link you create the symbol link and when to access it will be Storage/app/images/IMG.jpg. Tried so and still it didn’t work?? No error running command?!
– Anthony Rodrigues
How are you trying to access the public file? I mean, by which URI?
– adrianosmateus
Anthonyrodrigues : no, all right, you even created the symbolic link icon. tropicoder12 : With the following URL: project.local/Storage/public/images/image.jpeg
– Anderson Amorim