From b99f19b79d66578163e2c4c78c6694aa10d8002e Mon Sep 17 00:00:00 2001 From: Dirk Koritnik Date: Tue, 24 Jan 2023 12:01:27 +0000 Subject: [PATCH] Allow png images in file import from destination one --- Classes/Service/DestinationDataImportService.php | 9 ++++++++- Documentation/Changelog/3.1.0.rst | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index bf286f6..e57c92d 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -463,12 +463,19 @@ class DestinationDataImportService { $this->logger->info("Set assets"); + $allowedMimeTypes = [ + 'image/jpeg', + 'image/png', + ]; $importFolder = $this->import->getFilesFolder(); $error = false; foreach ($assets as $media_object) { - if ($media_object['rel'] == "default" && $media_object['type'] == "image/jpeg") { + if ( + $media_object['rel'] == "default" + && in_array($media_object['type'], $allowedMimeTypes) + ) { $fileUrl = urldecode($media_object['url']); $orgFileNameSanitized = $importFolder->getStorage()->sanitizeFileName( basename( diff --git a/Documentation/Changelog/3.1.0.rst b/Documentation/Changelog/3.1.0.rst index 4866a0d..d080486 100644 --- a/Documentation/Changelog/3.1.0.rst +++ b/Documentation/Changelog/3.1.0.rst @@ -37,6 +37,8 @@ Fixes Relates: #10253 +* Support import of png images from Destination One. + Tasks -----