-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for issue 19983 Can't upload customer Image attribute programmatically #19988
Changes from 3 commits
6d5ee63
188a3e6
20fd589
9ca8077
a051656
1372203
acc98ec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why need tools? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Base64 is not defined" when try upload image -> caused by line 173 ->
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is core issue for -> #18688 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's interesting, there are more js files using |
||
], function ($, _, utils, uiAlert, validator, Element, notification, $t) { | ||
'use strict'; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this ever evaluate to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes on event where empty value of ['tmp_name'] and file not uploaded
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition looks correct to me. If you really need a check for
empty($value['tmp_name'])
- make it a separate conditionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, I'd leave php side as it is