@baiducloud/sdk
Advanced tools
Comparing version 1.0.0-rc.5 to 1.0.0-rc.6
12
index.js
@@ -20,2 +20,4 @@ /** | ||
exports.version = require('./package.json').version; | ||
exports.crypto = require('./src/crypto'); | ||
exports.strings = require('./src/strings'); | ||
exports.STS = require('./src/sts'); | ||
@@ -43,11 +45,1 @@ exports.Auth = require('./src/auth'); | ||
exports.CfcClient = require('./src/cfc_client'); | ||
{ | ||
"name": "@baiducloud/sdk", | ||
"version": "1.0.0-rc.5", | ||
"version": "1.0.0-rc.6", | ||
"description": "Baidu Cloud Engine JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,3 +20,3 @@ Baidu Cloud Engine JavaScript SDK | ||
```html | ||
<script src="https://bce.bdstatic.com/lib/@baiducloud/sdk/1.0.0-rc.3/baidubce-sdk.bundle.min.js" ></script> | ||
<script src="https://bce.bdstatic.com/lib/@baiducloud/sdk/1.0.0-rc.6/baidubce-sdk.bundle.min.js" ></script> | ||
``` |
@@ -629,2 +629,34 @@ /** | ||
BosClient.prototype.uploadPartCopy = function (sourceBucket, sourceKey, targetBucket, targetKey, | ||
uploadId, partNumber, range, options) { | ||
if (!sourceBucket) { | ||
throw new TypeError('sourceBucket should not be empty'); | ||
} | ||
if (!sourceKey) { | ||
throw new TypeError('sourceKey should not be empty'); | ||
} | ||
if (!targetBucket) { | ||
throw new TypeError('targetBucket should not be empty'); | ||
} | ||
if (!targetKey) { | ||
throw new TypeError('targetKey should not be empty'); | ||
} | ||
if (partNumber < MIN_PART_NUMBER || partNumber > MAX_PART_NUMBER) { | ||
throw new TypeError(util.format('Invalid partNumber %d. The valid range is from %d to %d.', | ||
partNumber, MIN_PART_NUMBER, MAX_PART_NUMBER)); | ||
} | ||
options = this._checkOptions(options || {}); | ||
options.headers['x-bce-copy-source'] = strings.normalize(util.format('/%s/%s', sourceBucket, sourceKey), false); | ||
options.headers['x-bce-copy-source-range'] = range ? util.format('bytes=%s', range) : ''; | ||
return this.sendRequest('PUT', { | ||
bucketName: targetBucket, | ||
key: targetKey, | ||
headers: options.headers, | ||
config: options.config, | ||
params: {partNumber: partNumber, uploadId: uploadId} | ||
}); | ||
} | ||
BosClient.prototype.listParts = function (bucketName, key, uploadId, options) { | ||
@@ -631,0 +663,0 @@ /* eslint-disable */ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2216294
40
50805