Skip to content

Commit

Permalink
Prefix bucket public path so we don't break stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
flowan committed Feb 2, 2024
1 parent fc4ad76 commit 0bb2546
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 83 deletions.
9 changes: 4 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/public/bucket
/storage/*.key
/vendor
.env
Expand All @@ -16,8 +20,3 @@ yarn-error.log
/.vscode
/build
.phpactor.json

/public
!/public/favicon.ico
!/public/index.php
!/public/robots.txt
2 changes: 1 addition & 1 deletion app/Console/Commands/CreateBucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function handle()
if ($visibility === 'public') {
$this->laravel->make('files')->link(
bucket_path($bucket),
public_path($bucket)
public_path('bucket/'.$bucket)
);
}

Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/Install.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function handle()

$this->laravel->make('files')->link(
bucket_path($bucket),
public_path($bucket)
public_path('bucket/'.$bucket)
);

$this->info('Application installed');
Expand Down
2 changes: 1 addition & 1 deletion app/Helpers/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function bucket_relative_path(string $bucket = 'public', ?string $filePath = nul
->trim('/')
->toString();

return $bucket.($filePath ? '/'.$filePath : '');
return 'bucket/'.$bucket.($filePath ? '/'.$filePath : '');
}

function bucket_path(string $bucket = 'public', ?string $filePath = null): string
Expand Down
74 changes: 0 additions & 74 deletions config/filament.php

This file was deleted.

2 changes: 1 addition & 1 deletion config/filesystems.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

'local' => [
'driver' => 'local',
'root' => env('STORAGE_PATH', storage_path('app/bucket')),
'root' => env('STORAGE_PATH', storage_path('app')),
'throw' => false,
],

Expand Down

0 comments on commit 0bb2546

Please sign in to comment.