Refactor image URLs to use MinIO storage across various views and controllers
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m16s
All checks were successful
Deploy Production (crewsportswear.com) / deploy (push) Successful in 2m16s
This commit is contained in:
@@ -367,11 +367,7 @@ class DesignerController extends Controller {
|
||||
?>
|
||||
<div class="form-group col-md-3">
|
||||
<div class="thumbnail clipart-thumnail">
|
||||
<a href="#" class="img-clipart" data-link="<?php echo $row->SVGFilename; ?>"><img src="<?php echo config('site_config.uploads') . 'cliparts/'. $row->SVGFilename; ?>" width="100%"></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
<a href="#" class="img-clipart" data-link="<?php echo $row->SVGFilename; ?>"><img src="<?php echo minio_url('uploads/images/cliparts/' . $row->SVGFilename); ?>" width="100%"></a>
|
||||
|
||||
|
||||
|
||||
@@ -829,8 +825,8 @@ class DesignerController extends Controller {
|
||||
}
|
||||
|
||||
$arr = array(
|
||||
'small' => config('site_config.uploads') . $small ,
|
||||
'large' => config('site_config.uploads') . $large
|
||||
'small' => minio_url('uploads/images/' . $small),
|
||||
'large' => minio_url('uploads/images/' . $large)
|
||||
);
|
||||
|
||||
return json_encode($arr);
|
||||
|
||||
@@ -16,9 +16,9 @@ return [
|
||||
// 'company_name' => env('COMPANY_NAME','Acme Inc'),
|
||||
// 'company_email' => env('COMPANY_email','contact@acme.inc'),
|
||||
|
||||
'prod_private_server_ip' => env('https://crewsportswear.app', 'https://crewsportswear.app'),
|
||||
'images_url' => env('https://crewsportswear.app:5955', 'https://crewsportswear.app:5955'),
|
||||
'uploads' => env('https://crewsportswear.com/uploads/images/', 'https://crewsportswear.com/uploads/images/'), // local
|
||||
'prod_private_server_ip' => env('PROD_PRIVATE', 'https://crewsportswear.app'),
|
||||
'images_url' => env('IMAGES_URL', 'https://crewsportswear.app:5955'),
|
||||
'uploads' => env('MINIO_URL', 'https://minio.crewsportswear.app') . '/' . env('MINIO_BUCKET', 'crewsportswear') . '/uploads/images/', // MinIO storage
|
||||
|
||||
|
||||
];
|
||||
@@ -446,7 +446,7 @@
|
||||
@foreach ($pattern_arrays as $i => $val)
|
||||
<div class="item @if ($i == 0) active @endif">
|
||||
<div class="btn-group patternBox ">
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternThumbs btn" data-id="{{ $val[0]->PatternId }}" style="background-image:url('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternThumbs btn" data-id="{{ $val[0]->PatternId }}" style="background-image:url('{{ minio_url('uploads/images/' . $val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($i == 0) disabled @endif> @if ($i == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -546,7 +546,7 @@
|
||||
@foreach ($pattern_arrays as $r => $val)
|
||||
<div class="item @if ($r == 0) active @endif">
|
||||
<div class="btn-group patternBox ">
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternTrimThumbs patternTrim{{ $i }} btn" data-id="{{ $val[0]->PatternId }}" data-trim="{{ $i }}" style="background-image:url('{{ config('site_config.uploads') }}{{ $val[0]->PatternThumbnail }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
<button type="button" data-pattern-path="{{ $val[0]->SVGPath }}" class="patternTrimThumbs patternTrim{{ $i }} btn" data-id="{{ $val[0]->PatternId }}" data-trim="{{ $i }}" style="background-image:url('{{ minio_url('uploads/images/' . $val[0]->PatternThumbnail) }}'); background-size:cover; background-repeat: no-repeat;" @if ($r == 0) disabled @endif> @if ($r == 0) <i class="fa fa-2 fa-check" aria-hidden="true"></i> @endif</button>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
@@ -1306,7 +1306,7 @@
|
||||
|
||||
var patternSVGPath = $(this).attr('data-pattern-path');
|
||||
|
||||
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
|
||||
var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
|
||||
|
||||
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
||||
|
||||
@@ -1383,7 +1383,7 @@
|
||||
$(document).on('button click', '.patternTrimThumbs', function(){
|
||||
|
||||
var patternSVGPath = $(this).attr('data-pattern-path');
|
||||
var patternPath = "{{ config('site_config.uploads') }}" + patternSVGPath;
|
||||
var patternPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + patternSVGPath;
|
||||
var getTrimId = $(this).attr('data-trim');
|
||||
|
||||
var SideAndPath = {!! json_encode($templatepaths_arrays) !!};
|
||||
@@ -1527,7 +1527,7 @@
|
||||
var gradientIds = sideName+"_"+type+"_Gradients";
|
||||
var gradientPrefix = sideName+"_"+type+"_";
|
||||
|
||||
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
|
||||
var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
|
||||
console.log(tempPath)
|
||||
if(!document.getElementById(objectId))
|
||||
return false;
|
||||
@@ -1711,7 +1711,7 @@
|
||||
var type = SideAndPath[i]['Type'];
|
||||
var pathLocation = SideAndPath[i]['Path'];
|
||||
var canvasName = "canvas_" + type + "_" + sideName;
|
||||
var tempPath = "{{ config('site_config.uploads') }}" + pathLocation;
|
||||
var tempPath = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/" + pathLocation;
|
||||
|
||||
window['canvas_' + type + '_' + sideName] = new fabric.Canvas(canvasName);
|
||||
var templateFormat = SideAndPath[i]['TemplateFormat'];
|
||||
@@ -2043,9 +2043,9 @@
|
||||
|
||||
if(objType == "curvedText"){
|
||||
if(obj.effect == "curved"){
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/curve-logo.png" height="30px">');
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/curve-logo.png') }}" height="30px">');
|
||||
}else if(obj.effect == "arc"){
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ config('site_config.uploads') }}text-shapes-logo/arch-logo.png" height="30px">');
|
||||
$('#teamname_text_shape').html('Text Shape: <br><img src="{{ minio_url('uploads/images/text-shapes-logo/arch-logo.png') }}" height="30px">');
|
||||
}else{
|
||||
$('#teamname_text_shape').html('Add text Shape');
|
||||
}
|
||||
@@ -3345,7 +3345,7 @@
|
||||
function loadSVGClipart(dataUrl){
|
||||
var k = 0;
|
||||
var arrayPathId = [];
|
||||
var svgUrl = "{{ config('site_config.uploads') }}cliparts/" + dataUrl;
|
||||
var svgUrl = "{{ env('MINIO_URL', 'https://minio.crewsportswear.app') }}/{{ env('MINIO_BUCKET', 'crewsportswear') }}/uploads/images/cliparts/" + dataUrl;
|
||||
fabric.loadSVGFromURL(svgUrl, function(objects, options) {
|
||||
var clipart = fabric.util.groupSVGElements(objects, options );
|
||||
clipart.set({
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
</div>
|
||||
<div class="col-md-8 col-md-pull-4">
|
||||
<div style="border: 1px solid #e2e2e2; padding: 10px;">
|
||||
<h4><img height="30px" class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}"> {{ $store_array[0]->StoreName }}</h4>
|
||||
<h4><img height="30px" class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}"> {{ $store_array[0]->StoreName }}</h4>
|
||||
</div>
|
||||
@foreach($item_group as $item)
|
||||
@if($item->VoucherId == null)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<div class="thumb-border" style="border:1px solid #e2e2e2; padding: 5px;">
|
||||
<a href="{{ url('/designer') }}/{{ md5($r->TemplateCode) }}">
|
||||
<img src="{{ config('site_config.uploads') . $r->Thumbnail}}" alt="" class="image" />
|
||||
<img src="{{ minio_url('uploads/images/' . $r->Thumbnail) }}" alt="" class="image" />
|
||||
</a>
|
||||
<!-- <div class="overlay">
|
||||
<div class="text" style="font-family:Academic M54;"><a href="">{{$r->TemplateName}}</a></div>
|
||||
|
||||
@@ -86,9 +86,9 @@
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
@if($store_array[0]->StoreBanner == null)
|
||||
background-image: url("{{ config('site_config.uploads') . 'teamstore/store-banner-dark.png' }}");
|
||||
background-image: url("{{ minio_url('uploads/images/teamstore/store-banner-dark.png') }}");
|
||||
@else
|
||||
background-image: url("{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}");
|
||||
background-image: url("{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}");
|
||||
@endif
|
||||
background-color: #f3f3f3;
|
||||
background-position: center;
|
||||
|
||||
@@ -82,12 +82,12 @@
|
||||
<div style="border: 1px solid #dddddd; padding: 5px;">
|
||||
@if($store->Password != null )
|
||||
<a class="thumbnail password-protected" href="#" data-store-id="{{ $store->Id }}" data-store-url="{{ $store->StoreUrl }}">
|
||||
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/'. $store->ImageFolder . '/' . $store->StoreLogo }}">
|
||||
<img class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}">
|
||||
</a>
|
||||
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }} <i class="fa fa-lock" title="This store is password protected."></i></h4>
|
||||
@else
|
||||
<a class="thumbnail" href="{{ url('teamstore') . '/' . $store->StoreUrl }}">
|
||||
<img class="store-logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo }}">
|
||||
<img class="store-logo" src="{{ minio_url('uploads/images/teamstore/' . $store->ImageFolder . '/' . $store->StoreLogo) }}">
|
||||
</a>
|
||||
<h4 style="border-top: 1px solid #dddddd; padding: 10px; font-size: 16px; font-weight: bold; text-transform: uppercase;" class="text-center">{{ $store->StoreName }}</h4>
|
||||
@endif
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- Control Sidebar Toggle Button -->
|
||||
<li class="user user-menu">
|
||||
<a href="#">
|
||||
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="user-image" alt="User Image">
|
||||
<img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="user-image" alt="User Image">
|
||||
<span class="hidden-xs">{{ Auth::user()->username }}</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- Sidebar user panel -->
|
||||
<div class="user-panel">
|
||||
<div class="pull-left image">
|
||||
<img src="{{ config('site_config.uploads') . 'user/default-user.png' }}" class="img-circle" alt="User Image">
|
||||
<img src="{{ minio_url('uploads/images/user/default-user.png') }}" class="img-circle" alt="User Image">
|
||||
</div>
|
||||
<div class="pull-left info">
|
||||
<p>{{ Auth::user()->name }}</p>
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
<div class="col-sm-8">
|
||||
<p>Store Logo Preview:</p>
|
||||
<div class="store-logo-holder">
|
||||
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
|
||||
<img class="img_store_logo_img" id="img_store_logo" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
|
||||
<a href="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" class="img_store_logo_href" data-toggle="lightbox">
|
||||
<img class="img_store_logo_img" id="img_store_logo" src="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreLogo) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%; ">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -82,8 +82,8 @@
|
||||
<div class="col-sm-8">
|
||||
<p>Store Banner Preview:</p>
|
||||
<div class="store-banner-holder">
|
||||
<a href="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
|
||||
<img class="img_store_banner_img" id="img_store_banner" src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
|
||||
<a href="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" class="img_store_banner_href" data-toggle="lightbox">
|
||||
<img class="img_store_banner_img" id="img_store_banner" src="{{ minio_url('uploads/images/teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner) }}?v={{ time() }}" style="max-width: 100%; max-height: 100%;">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user