mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixed #8747 - upload path for uploaded images
This commit is contained in:
parent
6e4ab5cd96
commit
fbaf6e2494
|
@ -49,8 +49,7 @@ class ImageUploadRequest extends Request
|
|||
$type = strtolower(class_basename(get_class($item)));
|
||||
|
||||
if (is_null($path)) {
|
||||
$path = 'uploads/';
|
||||
$path .= str_plural($type);
|
||||
$path = str_plural($type);
|
||||
|
||||
if ($type == 'assetmodel') {
|
||||
$path = 'models';
|
||||
|
|
|
@ -729,16 +729,12 @@
|
|||
|
||||
<div class="col-md-4">
|
||||
|
||||
@if ($asset->image)
|
||||
@if (($asset->image) || (($asset->model) && ($asset->model->image!='')))
|
||||
|
||||
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 15px;">
|
||||
<a href="{{ Storage::disk('public')->url('uploads/assets/'. $asset->image) }}" data-toggle="lightbox">
|
||||
<img src="{{ Storage::disk('public')->url('uploads/assets/'. $asset->image) }}" class="assetimg img-responsive" alt="{{ $asset->getDisplayNameAttribute() }}">
|
||||
</a>
|
||||
</div>
|
||||
@elseif (($asset->model) && ($asset->model->image!=''))
|
||||
<div class="col-md-12 text-center" style="padding-bottom: 15px;">
|
||||
<a href="{{ Storage::disk('public')->url('uploads/models/'.$asset->model->image) }}" data-toggle="lightbox">
|
||||
<img src="{{ Storage::disk('public')->url('uploads/models/'.$asset->model->image) }}" class="assetimg img-responsive" alt="{{ $asset->getDisplayNameAttribute() }}">
|
||||
<a href="{{ ($asset->getImageUrl()) ? $asset->getImageUrl() : null }}" data-toggle="lightbox">
|
||||
<img src="{{ ($asset->getImageUrl()) ? $asset->getImageUrl() : null }}" class="assetimg img-responsive" alt="{{ $asset->getDisplayNameAttribute() }}">
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
|
|
Loading…
Reference in a new issue