protected function createFileHistory(PostPersistEvent $event)
    {
        // Find original filename in request uploaded file
        $files = $event->getRequest()->files->all();
        $uploadedFile = array_pop($files);
        $originalFileName = $uploadedFile->getClientOriginalName();

        // Get generated filename
        $fileName = $event->getFile()->getBasename();

        // Fill FileHistory object
        return $this->fileHistoryManager->createAndSave($fileName, $originalFileName, $event->getType());
    }