Skip to content

Commit f40424a

Browse files
authored
Merge pull request #96 from HiEventsDev/make-objects-public
Make public files public in object storage
2 parents 9d78493 + 00f5287 commit f40424a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

backend/app/Services/Infrastructure/Image/ImageStorageService.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ public function store(UploadedFile $image, string $imageType): ImageStorageRespo
3131
$path = $this->filesystemManager->disk($disk)->putFileAs(
3232
path: strtolower($imageType),
3333
file: $image,
34-
name: $filename
34+
name: $filename,
35+
options: [
36+
'visibility' => 'public',
37+
],
3538
);
3639

3740
if ($path === false) {

backend/config/filesystems.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
'endpoint' => env('AWS_ENDPOINT'),
5656
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
5757
'throw' => false,
58+
'visibility' => 'public',
5859
],
5960
's3-private' => [
6061
'driver' => 's3',

0 commit comments

Comments
 (0)