Skip to content

Commit

Permalink
Fixed storage env
Browse files Browse the repository at this point in the history
  • Loading branch information
korridor committed May 27, 2024
1 parent 1a61041 commit 7af77c9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/Service/Import/ImportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ public function import(Organization $organization, string $importerType, string
/** @var ImporterContract $importer */
$importer = app(ImporterProvider::class)->getImporter($importerType);
$importer->init($organization);
Storage::disk('s3')->put('import/'.Carbon::now()->toDateString().'-'.$organization->getKey().'-'.Str::uuid(), $data);
Storage::disk(config('filesystems.default'))
->put('import/'.Carbon::now()->toDateString().'-'.$organization->getKey().'-'.Str::uuid(), $data);

DB::transaction(function () use (&$importer, &$data) {
$importer->importData($data);
Expand Down
2 changes: 1 addition & 1 deletion config/jetstream.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@
|
*/

'profile_photo_disk' => env('PROFILE_PHOTO_DISK', 's3'),
'profile_photo_disk' => env('PROFILE_PHOTO_DISK', env('PUBLIC_FILESYSTEM_DISK', 'public')),

];
5 changes: 5 additions & 0 deletions config/logging.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
'replace_placeholders' => true,
],

'stderr_daily' => [
'driver' => 'stack',
'channels' => ['stderr', 'daily'],
],

'stack_production' => [
'driver' => 'stack',
'channels' => ['stderr', 'sentry'],
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Service/Import/ImportServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ImportServiceTest extends TestCase
public function test_import_gets_importer_from_provider_runs_importer_and_returns_report(): void
{
// Arrange
Storage::fake('s3');
Storage::fake(config('filesystems.default'));
$organization = Organization::factory()->create();
$data = file_get_contents(storage_path('tests/toggl_time_entries_import_test_1.csv'));

Expand Down

0 comments on commit 7af77c9

Please sign in to comment.