Display a file that is in the Storage folder - Laravel 5.2

0

I have a problem with my code. I can normally insert the file into the storage folder

$pathfile = $this->path_monografia . $monografia->id . DIRECTORY_SEPARATOR . "monografia.pdf";

Storage::disk('public')->put($pathfile, File::get($request->file('anexo')));

$monografia->caminho = Storage::disk('public')->url($pathfile);

But when I access it from the view I get an error:

 <tr ng-repeat="monografia in monografias | startFrom:(currentPage - 1) * pageSize | filter:search | limitTo:pageSize">
                    <td><a href="" ng-href="@{{monografia.caminho}}" > @{{ monografia.titulo }} </a> </td>
                    <td><a href="" ng-href="@{{monografia.caminho}}" > @{{ monografia.autor }} </a> </td>
                    <td><a href="" ng-href="@{{monografia.caminho}}" > @{{ monografia.orientador }} </a> </td>
                    <td><a href="" ng-href="@{{monografia.caminho}}" > @{{ monografia.nivel }} </a> </td>
                    <td><a href="" ng-href="@{{monografia.caminho}}" > @{{ monografia.publicated_at | date:' dd/MM/y' }} </a> </td>

Where monography.path refers to the url that was saved in the database. Thanks in advance

    
asked by anonymous 20.09.2017 / 18:15

0 answers