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 = (
7878 toastCallback : ( ) => void ,
7979) => {
8080 let basename = document . baseURI . replace ( window . location . origin , "" ) ;
81- let bytesLoaded = 0 ;
8281 const state = store . getState ( ) ;
8382 const anonymousMode = state . system . anonymousMode ;
8483
@@ -107,7 +106,6 @@ export const download = (
107106 "progress" ,
108107 function ( evt ) {
109108 let percentComplete = Math . round ( ( evt . loaded / fileSize ) * 100 ) ;
110- bytesLoaded = evt . loaded ;
111109 if ( progressCallback ) {
112110 progressCallback ( percentComplete ) ;
113111 }
@@ -118,7 +116,7 @@ export const download = (
118116 req . responseType = "blob" ;
119117 req . onreadystatechange = ( ) => {
120118 if ( req . readyState === XMLHttpRequest . DONE ) {
121- let completeDownload = bytesLoaded === fileSize ;
119+ let completeDownload = req . response . size === fileSize ;
122120
123121 if ( req . status === StatusCodes . OK && completeDownload ) {
124122 const rspHeader = req . getResponseHeader ( "Content-Disposition" ) ;
You can’t perform that action at this time.
0 commit comments