Skip to content

Commit b635e09

Browse files
committed
Backport-issue-195196
1 parent f69bf0c commit b635e09

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

app/code/Magento/Eav/Model/Attribute/Data/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ protected function _validateByRules($value)
146146
return $this->_fileValidator->getMessages();
147147
}
148148

149-
if (!empty($value['tmp_name']) && !is_uploaded_file($value['tmp_name'])) {
149+
if (!empty($value['tmp_name']) && !file_exists($value['tmp_name'])) {
150150
return [__('"%1" is not a valid file.', $label)];
151151
}
152152

app/code/Magento/Ui/view/base/web/js/form/element/file-uploader.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ define([
1414
'Magento_Ui/js/lib/validation/validator',
1515
'Magento_Ui/js/form/element/abstract',
1616
'mage/translate',
17-
'jquery/file-uploader'
17+
'jquery/file-uploader',
18+
'mage/adminhtml/tools'
1819
], function ($, _, utils, uiAlert, validator, Element, $t) {
1920
'use strict';
2021

app/code/Magento/Variable/view/adminhtml/web/variables.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ define([
99
'mage/translate',
1010
'Magento_Ui/js/modal/modal',
1111
'jquery/ui',
12-
'prototype'
12+
'prototype',
13+
'mage/adminhtml/tools'
1314
], function (jQuery, $t) {
1415
'use strict';
1516

0 commit comments

Comments
 (0)