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

This commit is contained in:
Frank John Begornia
2026-01-07 01:10:15 +08:00
parent 368ac50729
commit 8215ad8337
10 changed files with 27 additions and 31 deletions

View File

@@ -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({