Skip to content

Commit dcccadc

Browse files
authored
ENGCOM-4800: Error on design configuration save with imageUploader form element po… #22132
2 parents 9c27244 + 71efc42 commit dcccadc

File tree

1 file changed

+1
-1
lines changed
  • app/code/Magento/Theme/Model/Design/Backend

1 file changed

+1
-1
lines changed

app/code/Magento/Theme/Model/Design/Backend/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private function getMime()
235235
*/
236236
private function getRelativeMediaPath(string $path): string
237237
{
238-
return str_replace('/pub/media/', '', $path);
238+
return preg_replace('/\/(pub\/)?media\//', '', $path);
239239
}
240240

241241
/**

0 commit comments

Comments
 (0)