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) {
3737
3838const directoryPath = args [ 0 ] ;
3939const bucketName = args [ 1 ] ;
40- const hostName = 'objectstorage'
40+ const serviceName = 'objectstorage'
4141
4242const client = new os . ObjectStorageClient ( {
4343 authenticationDetailsProvider : provider
@@ -79,7 +79,7 @@ client.region = common.Region.US_PHOENIX_1;
7979 } ;
8080 // create pre authenticated request to generate the url
8181 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 } `
8383 const downloadUrl = resp . preauthenticatedRequest . accessUri ;
8484 console . log ( 'download url for the file ' + filename + ' is ' + baseUrl + downloadUrl ) ;
8585
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ if (args.length !== 2) {
3636
3737const directoryPath : string = args [ 0 ] ; // for eg : "/Users/Abc/upload-manager";
3838const bucketName = args [ 1 ] ;
39- const hostName = "objectstorage"
39+ const serviceName = "objectstorage"
4040
4141const client = new ObjectStorageClient ( { authenticationDetailsProvider : provider } ) ;
4242client . region = Region . US_PHOENIX_1 ;
@@ -77,8 +77,7 @@ client.region = Region.US_PHOENIX_1;
7777 } ;
7878 // create pre authenticated request to generate the url
7979 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 } `
8281 const downloadUrl = resp . preauthenticatedRequest . accessUri ;
8382 console . log ( "download url for the file " + filename + " is " + baseUrl + downloadUrl ) ;
8483
You can’t perform that action at this time.
0 commit comments