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

how i use this package out of validator ? #42

Open
vahidalvandi opened this issue Jul 21, 2021 · 4 comments
Open

how i use this package out of validator ? #42

vahidalvandi opened this issue Jul 21, 2021 · 4 comments

Comments

@vahidalvandi
Copy link

vahidalvandi commented Jul 21, 2021

hi . i have file manager and i want use event uploaded file , in bellow code after file uploaded i want scan it with calmAv

please help me thank you

\Event::listen('Alexusmai\LaravelFileManager\Events\FilesUploaded',
    function ($event) {
        \Log::info('FilesUploaded:', [
            $event->disk(),
            $event->path(),
            $event->files(),
            $event->overwrite(),
        ]);
    }
);

top code return

[2021-07-21 15:02:43] local.INFO: FilesUploading: ["public","",[{"name":"WhatsApp Image 2021-07-06 at 19.22.59 (1).jpeg","path":"/WhatsApp Image 2021-07-06 at 19.22.59 (1).jpeg","extension":"jpg"}],false]

i have disk and path , then i can get full path of file , now i need to validate path of file with calmav-validator

@vahidalvandi
Copy link
Author

vahidalvandi commented Jul 21, 2021

i this you need split 3 method in another class then we can use validateFileWithClamAv method in other purpose

    protected function validateFileWithClamAv($value)
    protected function getClamavSocket()
    protected function createQuahogScannerClient($socket)

@raonikhil
Copy link

@vahidalvandi were you able to achieve this? Can you please help me with this?
I want to pass the path of a local file and validate the file with clamav.

@matfish2
Copy link

matfish2 commented May 1, 2023

Any updates on this? We also want to validate file stored in local folder (not a request)

@mahendraulaka
Copy link

Any Update on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants