Allow png images in file import from destination one

This commit is contained in:
Dirk Koritnik 2023-01-24 12:01:27 +00:00
parent 8bd15ac380
commit b99f19b79d
2 changed files with 10 additions and 1 deletions

View file

@ -463,12 +463,19 @@ class DestinationDataImportService
{ {
$this->logger->info("Set assets"); $this->logger->info("Set assets");
$allowedMimeTypes = [
'image/jpeg',
'image/png',
];
$importFolder = $this->import->getFilesFolder(); $importFolder = $this->import->getFilesFolder();
$error = false; $error = false;
foreach ($assets as $media_object) { 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']); $fileUrl = urldecode($media_object['url']);
$orgFileNameSanitized = $importFolder->getStorage()->sanitizeFileName( $orgFileNameSanitized = $importFolder->getStorage()->sanitizeFileName(
basename( basename(

View file

@ -37,6 +37,8 @@ Fixes
Relates: #10253 Relates: #10253
* Support import of png images from Destination One.
Tasks Tasks
----- -----