File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 62
62
for ( var i = 0 ; i < files . length ; i ++ ) {
63
63
uploadCollection . appendChild ( createUCI ( files [ i ] ) ) ;
64
64
}
65
+ document . getElementById ( "fileUploader" ) . value = "" ;
65
66
} ) ;
66
67
67
68
uploadCollection . addEventListener ( "ui5-selectionChange" , function ( event ) {
86
87
uploadCollection . items . forEach ( function ( item ) {
87
88
if ( item . uploadState === "Ready" && item . file ) {
88
89
var oXHR = new XMLHttpRequest ( ) ;
89
-
90
+
90
91
oXHR . open ( "POST" , "/upload" , true ) ;
91
92
oXHR . onreadystatechange = function ( ) {
92
93
if ( this . status !== 200 ) {
123
124
console . log ( "Terminate uploading of: " , event . target ) ;
124
125
document . getElementById ( "uploadStateEvent" ) . innerText = "Terminate" ;
125
126
} ) ;
126
- } ) ( )
127
+ } ) ( )
Original file line number Diff line number Diff line change @@ -247,6 +247,12 @@ class FileUploader extends UI5Element {
247
247
this . _enableFormSupport ( ) ;
248
248
}
249
249
250
+ onAfterRendering ( ) {
251
+ if ( ! this . value ) {
252
+ this . getDomRef ( ) . querySelector ( `input[type="file"]` ) . value = "" ;
253
+ }
254
+ }
255
+
250
256
_enableFormSupport ( ) {
251
257
const FormSupport = getFeature ( "FormSupport" ) ;
252
258
You can’t perform that action at this time.
0 commit comments