Remove DL button if file doesn’t exist

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-09-15 16:11:27 -07:00
parent eb1e287c15
commit 62ad3fad1c

View file

@ -1213,7 +1213,7 @@
@endif
</td>
<td>
@if ($file->filename)
@if (($file->filename) && (Storage::exists('private_uploads/assets/'.$file->filename)))
<a href="{{ route('show/assetfile', [$asset->id, $file->id]) }}" class="btn btn-default">
<i class="fas fa-download" aria-hidden="true"></i>
</a>
@ -1310,7 +1310,7 @@
@endif
</td>
<td>
@if ($file->filename)
@if (($file->filename) && (Storage::exists('private_uploads/assetmodels/'.$file->filename)))
<a href="{{ route('show/modelfile', [$asset->model->id, $file->id]) }}" class="btn btn-default">
<i class="fas fa-download" aria-hidden="true"></i>
</a>