Skip to content

Commit c0d778c

Browse files
authored
ENGCOM-4275: Fix issue with custom option file uploading #21170
2 parents c9ca454 + 75a789f commit c0d778c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/internal/Magento/Framework/Filesystem/DirectoryList.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* Copyright © Magento, Inc. All rights reserved.
99
* See COPYING.txt for license details.
1010
*/
11+
1112
namespace Magento\Framework\Filesystem;
1213

1314
/**
@@ -96,7 +97,8 @@ public function __construct($root, array $config = [])
9697
static::validate($config);
9798
$this->root = $this->normalizePath($root);
9899
$this->directories = static::getDefaultConfig();
99-
$this->directories[self::SYS_TMP] = [self::PATH => realpath(sys_get_temp_dir())];
100+
$sysTmpPath = get_cfg_var('upload_tmp_dir') ?: sys_get_temp_dir();
101+
$this->directories[self::SYS_TMP] = [self::PATH => realpath($sysTmpPath)];
100102

101103
// inject custom values from constructor
102104
foreach ($this->directories as $code => $dir) {

0 commit comments

Comments
 (0)