Closed GerhardKotze closed 11 months ago
I built this feature specifically on top of S3. What is FILAMENT_FILESYSTEM_DISK set to?
Hi Dan, Apologies for wasting your time. I only set FILESYSTEM_DISK and not FILAMENT_FILESYSTEM_DISK. I assumed issue was unrelated as file was indeed uploaded to S3 when checking the bucket. Setting FILAMENT_FILESYSTEM_DISK=s3 resolved my issue.
Hi @GerhardKotze, Ask me a question, if possible. Are you using Amazon's AWS S3? I have the same problem as you, but I'm using Digital Ocean's S3. Your problem is exactly the same as mine, and I did everything you did, but the error still persisted.
@filipe-dynamics did you resolve that issue?
Same problem here.
If I remove FILAMENT_FILESYSTEM_DISK it works, but when setting, it returns s3 error when trying to import.
@danharrin Anyone got a solution this problem?
I'm using Digital Ocean's S3 object storage?
My FILAMENT_FILESYSTEM_DISK is to s3
s3 => [ 'driver' => 's3', 'key' => env('DO_SPACES_KEY'), 'secret' => env('DO_SPACES_SECRET'), 'region' => env('DO_SPACES_REGION'), 'bucket' => env('DO_SPACES_BUCKET'), 'url' => env('DO_SPACES_URL'), 'endpoint' => env('DO_SPACES_ENDPOINT'), 'use_path_style_endpoint' => env('DO_SPACES_USE_PATH_STYLE_ENDPOINT', false), 'throw' => false, ],
If you use DigitalOcean you need to ensure that you add the following "Allowed Headers" to your CORS settings:
@kyagie, @leoblanski, @rikoriswandha, @filipe-dynamics
If you use DigitalOcean you need to ensure that you add the following "Allowed Headers" to your CORS settings:
Content-Type
X-Amz-Acl
@kyagie, @leoblanski, @rikoriswandha, @filipe-dynamics
Yes, I fixed this.
Package
filament/actions
Package Version
v3.1.8
Laravel Version
v10.10
Livewire Version
v3.0.8
PHP Version
PHP 8.1.24
Problem description
CSV file import on Import Action gives 500 error when using s3 as storage. I can confirm file is uploaded to s3 in livewire-tmp/ directory. Logs show that /var/task/vendor/filament/actions/src/Concerns/CanImportRecords tried fopen(livewire-tmp/CkWtDN6ab0XILQOXGrfMxyJ8cz8Bnl-metacHJvZHVjdC1pbXBvcnRlci1leGFtcGxlLmNzdg==-.csv) and failed to find the file/directory.
Expected behavior
File uploaded successfully into S3 and import of rows started from file saved in s3.
Steps to reproduce
Set environment FILESYSTEM_DISK=s3
FILESYSTEM_DISK=s3
Add your s3 details to environment.
Create importer.
Add importer to Resource.
->headerActions([ ImportAction::make() ->importer(ProductImporter::class) ->maxRows(100000), Tables\Actions\CreateAction::make(), ])
Upload file via importer.
Reproduction repository
https://github.com/GerhardKotze/fuzzy-pancake
Relevant log output