File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ if (args.length !== 2) {
37
37
38
38
const directoryPath = args [ 0 ] ;
39
39
const bucketName = args [ 1 ] ;
40
- const hostName = 'objectstorage'
40
+ const serviceName = 'objectstorage'
41
41
42
42
const client = new os . ObjectStorageClient ( {
43
43
authenticationDetailsProvider : provider
@@ -79,7 +79,7 @@ client.region = common.Region.US_PHOENIX_1;
79
79
} ;
80
80
// create pre authenticated request to generate the url
81
81
const resp = await client . createPreauthenticatedRequest ( createPreauthenticatedRequest ) ;
82
- const baseUrl = ' https://' + hostName + '.' + common . Region . US_PHOENIX_1 . regionId + '.oraclecloud.com' ;
82
+ const baseUrl = ` https://${ serviceName } . ${ common . Region . US_PHOENIX_1 . regionId } . ${ common . Realm . OC1 . secondLevelDomain } `
83
83
const downloadUrl = resp . preauthenticatedRequest . accessUri ;
84
84
console . log ( 'download url for the file ' + filename + ' is ' + baseUrl + downloadUrl ) ;
85
85
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ if (args.length !== 2) {
36
36
37
37
const directoryPath : string = args [ 0 ] ; // for eg : "/Users/Abc/upload-manager";
38
38
const bucketName = args [ 1 ] ;
39
- const hostName = "objectstorage"
39
+ const serviceName = "objectstorage"
40
40
41
41
const client = new ObjectStorageClient ( { authenticationDetailsProvider : provider } ) ;
42
42
client . region = Region . US_PHOENIX_1 ;
@@ -77,8 +77,7 @@ client.region = Region.US_PHOENIX_1;
77
77
} ;
78
78
// create pre authenticated request to generate the url
79
79
const resp = await client . createPreauthenticatedRequest ( createPreauthenticatedRequest ) ;
80
- const baseUrl =
81
- "https://" + hostName + "." + common . Region . US_PHOENIX_1 . regionId + ".oraclecloud.com" ;
80
+ const baseUrl = `https://${ serviceName } .${ common . Region . US_PHOENIX_1 . regionId } .${ common . Realm . OC1 . secondLevelDomain } `
82
81
const downloadUrl = resp . preauthenticatedRequest . accessUri ;
83
82
console . log ( "download url for the file " + filename + " is " + baseUrl + downloadUrl ) ;
84
83
You can’t perform that action at this time.
0 commit comments