File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
web-app/src/screens/Console/Buckets/ListBuckets/Objects Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ export const download = (
78
78
toastCallback : ( ) => void ,
79
79
) => {
80
80
let basename = document . baseURI . replace ( window . location . origin , "" ) ;
81
- let bytesLoaded = 0 ;
82
81
const state = store . getState ( ) ;
83
82
const anonymousMode = state . system . anonymousMode ;
84
83
@@ -107,7 +106,6 @@ export const download = (
107
106
"progress" ,
108
107
function ( evt ) {
109
108
let percentComplete = Math . round ( ( evt . loaded / fileSize ) * 100 ) ;
110
- bytesLoaded = evt . loaded ;
111
109
if ( progressCallback ) {
112
110
progressCallback ( percentComplete ) ;
113
111
}
@@ -118,7 +116,7 @@ export const download = (
118
116
req . responseType = "blob" ;
119
117
req . onreadystatechange = ( ) => {
120
118
if ( req . readyState === XMLHttpRequest . DONE ) {
121
- let completeDownload = bytesLoaded === fileSize ;
119
+ let completeDownload = req . response . size === fileSize ;
122
120
123
121
if ( req . status === StatusCodes . OK && completeDownload ) {
124
122
const rspHeader = req . getResponseHeader ( "Content-Disposition" ) ;
You can’t perform that action at this time.
0 commit comments