From 7a111accf0404ace9451f29becd72a488c209315 Mon Sep 17 00:00:00 2001
From: David Snopek <11942-dsnopek@users.noreply.drupalcode.org>
Date: Wed, 26 Jul 2023 18:25:11 -0400
Subject: [PATCH] Issue #3375951 by dsnopek: "Maximum upload size" for field
 not passed to Media Browser

---
 file_entity.pages.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/file_entity.pages.inc b/file_entity.pages.inc
index 9c41ae9..6b56b55 100644
--- a/file_entity.pages.inc
+++ b/file_entity.pages.inc
@@ -1297,7 +1297,7 @@ function file_entity_get_upload_validators(array $options = array()) {
     $max_filesize = min($max_filesize, $file_entity_max_filesize);
   }
 
-  if (!empty($options['max_filesize']) && $options['max_filesize'] < $max_filesize) {
+  if (!empty($options['max_filesize']) && parse_size($options['max_filesize']) < $max_filesize) {
     $max_filesize = parse_size($options['max_filesize']);
   }
 
-- 
GitLab