File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
screens/Console/Buckets/ListBuckets/Objects/Preview Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,10 @@ import { BrowserHistoryBuildOptions } from "history/createBrowserHistory";
33
44let browserHistoryOpts : BrowserHistoryBuildOptions = { } ;
55
6+ let basename = document . baseURI . replace ( window . location . origin , "" ) ;
7+
8+ if ( basename !== "" ) {
9+ browserHistoryOpts . basename = basename ;
10+ }
11+
612export default createBrowserHistory ( browserHistoryOpts ) ;
Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ const PreviewFile = ({
7676
7777 if ( object ) {
7878 const encodedPath = encodeFileName ( object . name ) ;
79- path = `${ window . location . origin } /api/v1/buckets/${ bucketName } /objects/download?preview=true&prefix=${ encodedPath } ` ;
79+ let basename = document . baseURI . replace ( window . location . origin , "" ) ;
80+ path = `${ window . location . origin } ${ basename } api/v1/buckets/${ bucketName } /objects/download?preview=true&prefix=${ encodedPath } ` ;
8081 if ( object . version_id ) {
8182 path = path . concat ( `&version_id=${ object . version_id } ` ) ;
8283 }
You can’t perform that action at this time.
0 commit comments