Fixed storage env

This commit is contained in:
Constantin Graf
2024-05-27 15:17:37 +02:00
parent 1a610412dc
commit 7af77c9357
4 changed files with 9 additions and 3 deletions

View File

@@ -24,7 +24,8 @@ class ImportService
/** @var ImporterContract $importer */ /** @var ImporterContract $importer */
$importer = app(ImporterProvider::class)->getImporter($importerType); $importer = app(ImporterProvider::class)->getImporter($importerType);
$importer->init($organization); $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) { DB::transaction(function () use (&$importer, &$data) {
$importer->importData($data); $importer->importData($data);

View File

@@ -77,6 +77,6 @@ return [
| |
*/ */
'profile_photo_disk' => env('PROFILE_PHOTO_DISK', 's3'), 'profile_photo_disk' => env('PROFILE_PHOTO_DISK', env('PUBLIC_FILESYSTEM_DISK', 'public')),
]; ];

View File

@@ -67,6 +67,11 @@ return [
'replace_placeholders' => true, 'replace_placeholders' => true,
], ],
'stderr_daily' => [
'driver' => 'stack',
'channels' => ['stderr', 'daily'],
],
'stack_production' => [ 'stack_production' => [
'driver' => 'stack', 'driver' => 'stack',
'channels' => ['stderr', 'sentry'], 'channels' => ['stderr', 'sentry'],

View File

@@ -17,7 +17,7 @@ class ImportServiceTest extends TestCase
public function test_import_gets_importer_from_provider_runs_importer_and_returns_report(): void public function test_import_gets_importer_from_provider_runs_importer_and_returns_report(): void
{ {
// Arrange // Arrange
Storage::fake('s3'); Storage::fake(config('filesystems.default'));
$organization = Organization::factory()->create(); $organization = Organization::factory()->create();
$data = file_get_contents(storage_path('tests/toggl_time_entries_import_test_1.csv')); $data = file_get_contents(storage_path('tests/toggl_time_entries_import_test_1.csv'));