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

 - Merge Pull Request #19988 from Nazar65/magento2:issue-19983
 - Merged commits:
   1. 6d5ee63
   2. 188a3e6
   3. 20fd589
   4. 9ca8077
   5. a051656
   6. 1372203
   7. acc98ec
  • Loading branch information
magento-engcom-team committed Feb 14, 2019
2 parents 1fb83b1 + acc98ec commit 0e34c7b
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 0e34c7b

Please sign in to comment.