updateMediaEntity example

$mediaFile->getFileExtension(),
            $context
        );

        $this->validateFileExtension($mediaFile$mediaId$currentMedia->isPrivate());

        $this->removeOldMediaData($currentMedia$context);

        $mediaType = $this->typeDetector->detect($mediaFile);
        $metaData = $this->metadataLoader->loadFromFile($mediaFile$mediaType);

        $media = $this->updateMediaEntity(
            $mediaFile,
            $destination,
            $currentMedia,
            $metaData,
            $mediaType,
            $context
        );

        $this->saveFileToMediaDir($mediaFile$media);

        $message = new GenerateThumbnailsMessage();
        
Home | Imprint | This part of the site doesn't use cookies.