Skip to content

A free open source IT asset/license management system

Remove DL button if file doesn’t exist

snipe62ad3fad1c4a
diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php
index b5fa5c4af3..167ad70287 100755
--- a/resources/views/hardware/view.blade.php
+++ b/resources/views/hardware/view.blade.php
@@ -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>