Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sarun Mungthanya
SpnPatch-Laravel
Commits
69376e11
Commit
69376e11
authored
Jan 08, 2025
by
Thidaporn Laisan
Browse files
fix issue upload
parent
fa570b82
Changes
1
Hide whitespace changes
Inline
Side-by-side
resources/views/livewire/pages/master-file-xml/master-file-edit.blade.php
View file @
69376e11
...
...
@@ -101,16 +101,22 @@
@if ($uploadFilePathName1)
<div
class=
"mt-4 relative inline-block rounded-lg overflow-hidden shadow-lg border border-gray-300"
>
@if ($uploadFilePathName1 instanceof \Illuminate\Http\UploadedFile)
<img
src=
"{{ $uploadFilePathName1->temporaryUrl() }}"
alt=
"Uploaded Image"
class=
"w-200 h-200 object-cover"
>
<img
src=
"{{ $uploadFilePathName1->temporaryUrl() }}"
alt=
"Uploaded Image"
class=
"w-64 h-64 object-cover"
>
@elseif (\Illuminate\Support\Facades\Storage::disk('public')->exists($uploadFilePathName1))
<img
src=
"{{ asset('storage/' . $uploadFilePathName1) }}"
alt=
"Uploaded Image"
class=
"w-64 h-64 object-cover"
>
@else
<img
src=
"{{ asset('storage/' . $uploadFilePathName1) }}"
alt=
"Uploaded Image"
class=
"w-200 h-200"
>
<div
class=
"w-64 h-64 bg-gray-100 flex items-center justify-center text-gray-500 italic"
>
No file uploaded
</div>
@endif
<button
wire:click.prevent=
"removeFile('uploadFilePathName1')"
class=
"absolute top-2 right-2 bg-red-600 text-white rounded-full p-1 shadow-md hover:bg-red-700 transition duration-300"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
class=
"h-6 w-6"
viewBox=
"0 0 20 20"
fill=
"currentColor"
>
<path
fill-rule=
"evenodd"
d=
"M10 9l-5 5-1-1 5-5-5-5 1-1 5 5 5-5 1 1-5 5 5 5-1 1-5-5z"
clip-rule=
"evenodd"
/>
</svg>
</button>
@if ($uploadFilePathName1 instanceof \Illuminate\Http\UploadedFile || \Illuminate\Support\Facades\Storage::disk('public')->exists($uploadFilePathName1))
<button
wire:click.prevent=
"removeFile('uploadFilePathName1')"
class=
"absolute top-2 right-2 bg-red-600 text-white rounded-full p-1 shadow-md hover:bg-red-700 transition duration-300"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
class=
"h-6 w-6"
viewBox=
"0 0 20 20"
fill=
"currentColor"
>
<path
fill-rule=
"evenodd"
d=
"M10 9l-5 5-1-1 5-5-5-5 1-1 5 5 5-5 1 1-5 5 5 5-1 1-5-5z"
clip-rule=
"evenodd"
/>
</svg>
</button>
@endif
</div>
@else
<div
class=
"mt-4 text-sm text-gray-500 italic"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment