From f28bda65fed6a99f90bfdf96288c22584a151223 Mon Sep 17 00:00:00 2001 From: xiawu <62440-xiawu@users.noreply.drupalcode.org> Date: Mon, 20 May 2024 13:05:45 +0000 Subject: [PATCH] Issue #3355247: Image uploading failure --- src/Plugin/Layout/AwesomeLayout.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Plugin/Layout/AwesomeLayout.php b/src/Plugin/Layout/AwesomeLayout.php index 1c1d5f2..a30294b 100644 --- a/src/Plugin/Layout/AwesomeLayout.php +++ b/src/Plugin/Layout/AwesomeLayout.php @@ -171,7 +171,7 @@ class AwesomeLayout extends LayoutDefault implements PluginFormInterface { '#default_value' => $this->configuration['section_properties']['background_image'], '#upload_validators' => [ 'file_validate_extensions' => ['gif png jpg jpeg svg'], - 'file_validate_size' => '30M', + 'file_validate_size' => [1024 * 1024 * 30], ], ]; @@ -237,7 +237,7 @@ class AwesomeLayout extends LayoutDefault implements PluginFormInterface { '#default_value' => $this->configuration[$key]['background_image'], '#upload_validators' => [ 'file_validate_extensions' => ['gif png jpg jpeg svg'], - 'file_validate_size' => '30M', + 'file_validate_size' => [1024 * 1024 * 30], ], ]; -- GitLab