private readonly FilesystemOperator $filesystemPublic,
private readonly FilesystemOperator $filesystemPrivate,
private readonly UrlGeneratorInterface $urlGenerator,
private readonly ThumbnailService $thumbnailService,
private readonly MetadataLoader $metadataLoader,
private readonly TypeDetector $typeDetector,
private readonly MessageBusInterface $messageBus,
private readonly EventDispatcherInterface $eventDispatcher,
private readonly array $allowedExtensions,
private readonly array $privateAllowedExtensions
) {
$this->fileNameValidator = new FileNameValidator();
}
/**
* @throws MediaException
*/
public function persistFileToMedia(
MediaFile $mediaFile,
string $destination,
string $mediaId,
Context $context
): void {