Grab image inside Storage folder

Asked

Viewed 1,063 times

1

I’m uploading images to the folder storage, app/public, inside this created a folder /banners and I’m uploading these images into this folder.

How can I take these images and display in the view?

  • The Laravel version is 5.2 even?

  • Yes that’s right.

  • the answer was not satisfactory, need to understand something else, has something to say?

2 answers

2

Create a symbolic link inside the briefcase /public. How to create symbolic link, examples here on Sopt?:

All examples are for bash and in the Windows since the Windows Vista it is possible to create with the command mklink:

Sintaxe

MKLINK [[/d] | [/h] | [/j]] <Link><Target>

Parameters

/d Creates a symbolic link from the directory. By default, mklink creates a symbolic link to the file.

/h Creates a real link instead of a symbolic link.

/j Creates a directory merge.

<Link> Specifies the name of the symbolic link being created.

<Target> Specifies the path (relative or absolute) to which the new symbolic link refers.

/? Displays Help at command prompt.

Reference: Microsoft Technet - MKLINK


In the version , with the command php artisan storage:link creates a symbolic link to the folder public/storage.

inserir a descrição da imagem aqui

Observing: in Windows since the Vista can create symbolic link with the command mklink

References:

1

A simpler way would be:

Asset("Storage/app/public/banners/banner.png");

Browser other questions tagged

You are not signed in. Login or sign up in order to post.