Cant download xlsx in vapor through Export action

Currently CSV files are downloading fine but XLSX are throwing {"message":"Internal Server Error"} in Vapor
2 Replies
Stefano
Stefano4d ago
Did you ever solve this? Having the same issue it seems to work locally (using minio to store files)
Stefano
Stefano4d ago
I could narrow it down to Filament\Actions\Exports\Downloaders\XlsxDownloader the issue seems to be
if ($disk->exists($filePath = $directory . DIRECTORY_SEPARATOR . $fileName)) {
return $disk->download($filePath);
}
if ($disk->exists($filePath = $directory . DIRECTORY_SEPARATOR . $fileName)) {
return $disk->download($filePath);
}
the download method is having issues with the lambda runtime. I would guess this is what I am talking about: https://docs.vapor.build/projects/development.html#binary-responses if I delete the file, the streamed response kicks in (building the file inside the stream from the CSV data), which works just fine. Unfortunately there doesnt seem to be a way to keep the xlsx download button but disable its generation (I wouldnt even call this correct)
Development | Laravel Vapor
Laravel at Infinite Scale