Skip to content

Commit d208c72

Browse files
authored
Fix logic of previous commit.
1 parent f874eb0 commit d208c72

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/resources/views/crud/columns/image.blade.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@
1919
if (preg_match('/^data\:image\//', $column['value'])) { // base64_image
2020
$href = $src = $column['value'];
2121
} elseif (isset($column['disk'])) { // image from a different disk (like s3 bucket)
22-
$href = $src = Storage::disk($column['disk'])->url($column['prefix'].$column['value']);
23-
} elseif (isset($column['disk']) && !empty($column['private_s3_bucket'])) {
24-
$href = $src = Storage::disk($column['disk'])
25-
->temporaryUrl($column['prefix'].$column['value'], now()->addMinute());
22+
23+
if (!empty($column['private_s3_bucket'])) {
24+
$href = $src = Storage::disk($column['disk'])
25+
->temporaryUrl($column['prefix'].$column['value'], now()->addMinute());
26+
} else {
27+
$href = $src = Storage::disk($column['disk'])->url($column['prefix'].$column['value']);
28+
}
29+
2630
} else { // plain-old image, from a local disk
2731
$href = $src = asset($column['prefix'] . $column['value']);
2832
}

0 commit comments

Comments
 (0)