Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BulkAction Storage download not working for table in livewire component #12253

Closed
marty12321 opened this issue Apr 9, 2024 · 1 comment
Closed

Comments

@marty12321
Copy link

Package

filament/filament

Package Version

v3.2

Laravel Version

v10.48

Livewire Version

v3.4

PHP Version

PHP 8.1

Problem description

When try to use simple livewire function Storage download, got no responsereturn Storage::disk('private')->download('file_new.zip', 'file.zip') the same function working on record action in table or as livewire component.

Expected behavior

expected download a file from server

Steps to reproduce

simple bulk action for table to check this case

BulkAction::make('download')->action(function ($records) {                    
                      return $this->download();
                   })
                  ->deselectRecordsAfterCompletion()
                  ->color('success'),

this one is working in row action without any problem

Action::make('get zip')
                    ->icon('heroicon-s-arrow-down-tray')
                    ->action(fn(Document $document) => $this->download()),

and the livewire function to download file (it is also working without any problem):

public function download()
    {   
        if (Storage::disk('private')->exists('file2.zip')) {
           return Storage::disk('private')->download('file2.zip', 'file.zip');
       }
    }

using wire:click='download()' working without any problem in livewire

Reproduction repository

https://gist.github.com/marty12321/8c8ea494aeabc586d454f9dc268e2e65#file-directorycomponent-php

Relevant log output

no output
Copy link

github-actions bot commented Apr 9, 2024

Hey @marty12321! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

1 participant