clamav-validator icon indicating copy to clipboard operation
clamav-validator copied to clipboard

how i use this package out of validator ?

Open vahidalvandi opened this issue 4 years ago • 5 comments

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 avatar Jul 21 '21 10:07 vahidalvandi

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)

vahidalvandi avatar Jul 21 '21 11:07 vahidalvandi

@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.

raonikhil avatar Apr 07 '22 07:04 raonikhil

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

matfish2 avatar May 01 '23 08:05 matfish2

Any Update on this ?

mahendraulaka avatar May 30 '23 11:05 mahendraulaka