Skip to content

Commit

Permalink
ENGCOM-4152: Fix for issue 19983 Can't upload customer Image attribut…
Browse files Browse the repository at this point in the history
…e programmatically #19988
  • Loading branch information
sivaschenko authored Feb 24, 2019
2 parents d3ca9d1 + 0e34c7b commit d5cc340
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 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'])) {
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 @@ -16,7 +16,8 @@ define([
'Magento_Ui/js/form/element/abstract',
'mage/backend/notification',
'mage/translate',
'jquery/file-uploader'
'jquery/file-uploader',
'mage/adminhtml/tools'
], function ($, _, utils, uiAlert, validator, Element, notification, $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 @@ -16,7 +16,8 @@ define([
'Magento_Variable/js/custom-directive-generator',
'Magento_Ui/js/lib/spinner',
'jquery/ui',
'prototype'
'prototype',
'mage/adminhtml/tools'
], function (jQuery, notification, $t, wysiwyg, registry, mageApply, utils, configGenerator, customGenerator, loader) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ define([
'Magento_Variable/js/config-directive-generator',
'Magento_Variable/js/custom-directive-generator',
'wysiwygAdapter',
'jquery'
'jquery',
'mage/adminhtml/tools'
], function (configDirectiveGenerator, customDirectiveGenerator, wysiwyg, jQuery) {
return function (config) {
tinymce.create('tinymce.plugins.magentovariable', {
Expand Down

0 comments on commit d5cc340

Please sign in to comment.