src/EventSubscriber/Order/PhotoPermissionSubscriber.php line 22
<?php/** This file is part of the Pellipop project.** (c) Mobizel** For the full copyright and license information, please view the LICENSE* file that was distributed with this source code.*/declare(strict_types=1);namespace App\EventSubscriber\Order;use App\Entity\Order\OrderItemPhoto;use Symfony\Component\EventDispatcher\EventSubscriberInterface;use Vich\UploaderBundle\Event\Event;class PhotoPermissionSubscriber implements EventSubscriberInterface{public function postUpload(Event $event){$object = $event->getObject();if ($object instanceof OrderItemPhoto) {@chmod($object->getFile()->getPathname(), 0666);}}public static function getSubscribedEvents(){return ['vich_uploader.post_upload' => 'postUpload',];}}