<?php


namespace Magetop\Advancepreview\Plugin;


class AddZipPlugin
{
    public function afterIsValid(\Magento\MediaStorage\Model\File\Validator\NotProtectedExtension $subject, $result, $value) {
        $writer = new \Zend_Log_Writer_Stream(BP . '/var/log/test_upload.log');
        $logger = new \Zend_Log();
        $logger->addWriter($writer);
        $logger->info('text message ', $value);
        return $value == 'zip' ? true : $result;
    }
}
