File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
portal-ui/src/screens/Console/Buckets/ListBuckets/Objects Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,11 @@ export const download = (
3131) => {
3232 const anchor = document . createElement ( "a" ) ;
3333 document . body . appendChild ( anchor ) ;
34- let path = `/api/v1/buckets/${ bucketName } /objects/download?prefix=${ objectPath } ${
34+ let basename = document . baseURI . replace ( window . location . origin , "" ) ;
35+
36+ let path = `${
37+ window . location . origin
38+ } ${ basename } api/v1/buckets/${ bucketName } /objects/download?prefix=${ objectPath } ${
3539 overrideFileName !== null && overrideFileName . trim ( ) !== ""
3640 ? `&override_file_name=${ encodeURLString ( overrideFileName || "" ) } `
3741 : ""
@@ -45,7 +49,7 @@ export const download = (
4549 req . addEventListener (
4650 "progress" ,
4751 function ( evt ) {
48- var percentComplete = Math . round ( ( evt . loaded / fileSize ) * 100 ) ;
52+ let percentComplete = Math . round ( ( evt . loaded / fileSize ) * 100 ) ;
4953
5054 if ( progressCallback ) {
5155 progressCallback ( percentComplete ) ;
You can’t perform that action at this time.
0 commit comments