File tree Expand file tree Collapse file tree 2 files changed +19
-8
lines changed
app/code/Magento/Ui/view/base/web Expand file tree Collapse file tree 2 files changed +19
-8
lines changed Original file line number Diff line number Diff line change 11/**
2- * Copyright © Magento, Inc. All rights reserved.
3- * See COPYING.txt for license details .
2+ * Copyright 2015 Adobe
3+ * All Rights Reserved .
44 */
55
66/**
@@ -14,6 +14,7 @@ define([
1414
1515 return Abstract . extend ( {
1616 defaults : {
17+ value : '' ,
1718 links : {
1819 value : ''
1920 }
@@ -47,6 +48,16 @@ define([
4748 this . formId = namespace [ 0 ] ;
4849
4950 return this ;
51+ } ,
52+
53+ /**
54+ * Set the file input value
55+ *
56+ * @param {FileUploader } fileUploader - UI Class
57+ * @param {Event } e
58+ */
59+ setFileValue : function ( fileUploader , e ) {
60+ this . value ( e . target . files . length ? e . target . files . length : '' ) ;
5061 }
5162 } ) ;
5263} ) ;
Original file line number Diff line number Diff line change 11<!--
2- /**
3- * Copyright © Magento, Inc. All rights reserved.
4- * See COPYING.txt for license details .
5- */
2+ /**
3+ * Copyright 2011 Adobe
4+ * All Rights Reserved .
5+ */
66-->
77< input class ="admin__control-file " type ="file " data-bind ="
88 hasFocus: focused,
1313 id: uid,
1414 disabled: disabled,
1515 form: formId
16- } "
17- / >
16+ }, event:{change: setFileValue} "
17+ >
You can’t perform that action at this time.
0 commit comments