// The bucket region can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket/. For more information on regions, visit https://www.tencentcloud.com/document/product/436/6224?from_cn_redirect=1.let region = "ap-beijing"; // Bucket regionlet customDomain = "exampledomain.com"; // Custom domain name// Create a `CosXmlServiceConfig` object and modify the configuration parameters as neededlet cosXmlServiceConfig = {region: region,isDebuggable: false,isHttps: true,hostFormat: customDomain // Modify the requested domain name};// Register the default COS serviceawait Cos.registerDefaultService(cosXmlServiceConfig)
// The bucket region can be viewed in the COS console at https://console.tencentcloud.com/cos5/bucket/. For more information on regions, visit https://www.tencentcloud.com/document/product/436/6224?from_cn_redirect=1.let region = "ap-beijing"; // Bucket regionlet accelerate = true; // Enable the global acceleration endpoint// Create a `CosXmlServiceConfig` object and modify the configuration parameters as neededlet cosXmlServiceConfig = {region: region,isDebuggable: false,isHttps: true,accelerate: accelerate};// Register the default COS serviceawait Cos.registerDefaultService(cosXmlServiceConfig)
masukan