ExportAction download file on Digital Ocean Spaces

hi all, as i mention in the title i've and export action like this:
->headerActions([
ExportAction::make()
->exporter(UserExporter::class)
->label('Export USers')
->icon('heroicon-o-document-text')
->color('primary'),
]);
->headerActions([
ExportAction::make()
->exporter(UserExporter::class)
->label('Export USers')
->icon('heroicon-o-document-text')
->color('primary'),
]);
If i set the FILAMENT_FILESYSTEM_DISK=local or not set it all it's ok: after i click export button i receive a notification in which i have the link to download the csv or xlsx and all that's fine. But if i set FILAMENT_FILESYSTEM_DISK=s3 all it's ok until i try to download the file. If i click on link to csv or xlsx i receive and error page like the image shows. the error is in :
Routing
Controller
Filament\Actions\Exports\Http\Controllers\DownloadExport

Route name
filament.exports.download

Middleware
filament.actions
Routing
Controller
Filament\Actions\Exports\Http\Controllers\DownloadExport

Route name
filament.exports.download

Middleware
filament.actions
What's wrong with this? Consider that i only want to download and not store those files. #help #Export download link
1 Reply
ocram82
ocram822mo ago
A little update, maybe someone can give a suggest on this. The problem is in this file: /vendor/filament/actions/src/Exports/Downloaders/CsvDownloader.php
<?php

namespace Filament\Actions\Exports\Downloaders;

use Filament\Actions\Exports\Downloaders\Contracts\Downloader;
use Filament\Actions\Exports\Models\Export;
use Symfony\Component\HttpFoundation\StreamedResponse;

class CsvDownloader implements Downloader
{
public function __invoke(Export $export): StreamedResponse
{
$disk = $export->getFileDisk();
$directory = $export->getFileDirectory();

if (! $disk->exists($directory)) {
abort(404);
}
...
<?php

namespace Filament\Actions\Exports\Downloaders;

use Filament\Actions\Exports\Downloaders\Contracts\Downloader;
use Filament\Actions\Exports\Models\Export;
use Symfony\Component\HttpFoundation\StreamedResponse;

class CsvDownloader implements Downloader
{
public function __invoke(Export $export): StreamedResponse
{
$disk = $export->getFileDisk();
$directory = $export->getFileDirectory();

if (! $disk->exists($directory)) {
abort(404);
}
...
This check fails if (! $disk->exists($directory)) { because Filament can't see Digital Ocean bucket as a "path". This is how i saw. Any suggestion on this?