public function updateFile(FileCreateOrUpdateEvent $event)
    {
        // Copy and save file
        if ($event->getUploadedFile()) {
            // Remove old picture file from file storage
            $url = $event->getModel()->getUploadDir() . '/' . $event->getOldModel()->getFile();
            unlink(str_replace('..', '', $url));

            $newUploadedFile = $this->fileManager->copyUploadedFile($event->getModel(), $event->getUploadedFile());
            $event->setUploadedFile($newUploadedFile);
        }

        // Update image modifications
        $event->getModel()->save();

        $event->setModel($event->getModel());
    }