Skip to content

Commit 6b9eaba

Browse files
author
Oleksii Korshenko
authored
MAGETWO-87657: magento#11252: fix adminhtml file attribute edit form magento#13563
2 parents c7acfe2 + bf391fa commit 6b9eaba

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/Customer/Model/FileUploader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function upload()
110110
$result = $fileProcessor->saveTemporaryFile($this->scope . '[' . $this->getAttributeCode() . ']');
111111

112112
// Update tmp_name param. Required for attribute validation!
113-
$result['tmp_name'] = $result['path'] . '/' . ltrim($result['file'], '/');
113+
$result['tmp_name'] = ltrim($result['file'], '/');
114114

115115
$result['url'] = $fileProcessor->getViewUrl(
116116
FileProcessor::TMP_DIR . '/' . ltrim($result['name'], '/'),

app/code/Magento/Customer/Test/Unit/Model/FileUploaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function testUpload()
140140
'name' => $resultFileName,
141141
'file' => $resultFileName,
142142
'path' => $resultFilePath,
143-
'tmp_name' => $resultFilePath . $resultFileName,
143+
'tmp_name' => ltrim($resultFileName, '/'),
144144
'url' => $resultFileUrl,
145145
];
146146

0 commit comments

Comments
 (0)