Skip to content

Commit

Permalink
Backport-issue-195196
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Feb 25, 2019
1 parent f69bf0c commit b635e09
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/code/Magento/Eav/Model/Attribute/Data/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected function _validateByRules($value)
return $this->_fileValidator->getMessages();
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ define([
'Magento_Ui/js/lib/validation/validator',
'Magento_Ui/js/form/element/abstract',
'mage/translate',
'jquery/file-uploader'
'jquery/file-uploader',
'mage/adminhtml/tools'
], function ($, _, utils, uiAlert, validator, Element, $t) {
'use strict';

Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/Variable/view/adminhtml/web/variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ define([
'mage/translate',
'Magento_Ui/js/modal/modal',
'jquery/ui',
'prototype'
'prototype',
'mage/adminhtml/tools'
], function (jQuery, $t) {
'use strict';

Expand Down

0 comments on commit b635e09

Please sign in to comment.