Skip to content

Commit

Permalink
修复 test-123-1250000000 bucket 分片上传出错问题
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Jan 12, 2018
1 parent 043bada commit b915a89
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 190 deletions.
152 changes: 56 additions & 96 deletions dist/cos-js-sdk-v5.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/cos-js-sdk-v5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cos-js-sdk-v5",
"version": "0.3.4",
"version": "0.3.6",
"description": "cos js sdk v5",
"main": "index.js",
"scripts": {
Expand Down
18 changes: 0 additions & 18 deletions src/advance.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ function sliceUploadFile(params, callback) {
var Region = params.Region;
var Key = params.Key;
var Body = params.Body;
var AppId = params.AppId;
var SliceSize = params.SliceSize || this.options.ChunkSize;
var AsyncLimit = params.AsyncLimit;
var StorageClass = params.StorageClass || 'Standard';
Expand All @@ -37,7 +36,6 @@ function sliceUploadFile(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
UploadId: data.UploadId,
SliceList: data.SliceList
}, function (err, data) {
Expand All @@ -56,7 +54,6 @@ function sliceUploadFile(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
Body: Body,
FileSize: FileSize,
SliceSize: SliceSize,
Expand All @@ -81,7 +78,6 @@ function sliceUploadFile(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
StorageClass: StorageClass,
Body: Body,
FileSize: FileSize,
Expand Down Expand Up @@ -116,7 +112,6 @@ function getUploadIdAndPartList(params, callback) {
var Bucket = params.Bucket;
var Region = params.Region;
var Key = params.Key;
var AppId = params.AppId;
var Body = params.Body;
var StorageClass = params.StorageClass;
var self = this;
Expand Down Expand Up @@ -234,7 +229,6 @@ function getUploadIdAndPartList(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
StorageClass: StorageClass,
});
self.multipartInit(_params, function (err, data) {
Expand All @@ -258,7 +252,6 @@ function getUploadIdAndPartList(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
UploadId: UploadId,
}, function (err, PartListData) {
if (!self._isRunningTask(TaskId)) return;
Expand Down Expand Up @@ -298,7 +291,6 @@ function getUploadIdAndPartList(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId
}, function (err, data) {
if (!self._isRunningTask(TaskId)) return;
if (err) {
Expand All @@ -324,7 +316,6 @@ function wholeMultipartList(params, callback) {
var sendParams = {
Bucket: params.Bucket,
Region: params.Region,
AppId: params.AppId,
Prefix: params.Key
};
var next = function () {
Expand All @@ -351,7 +342,6 @@ function wholeMultipartListPart(params, callback) {
Bucket: params.Bucket,
Region: params.Region,
Key: params.Key,
AppId: params.AppId,
UploadId: params.UploadId
};
var next = function () {
Expand Down Expand Up @@ -385,7 +375,6 @@ function uploadSliceList(params, cb) {
var Bucket = params.Bucket;
var Region = params.Region;
var Key = params.Key;
var AppId = params.AppId;
var UploadData = params.UploadData;
var FileSize = params.FileSize;
var SliceSize = params.SliceSize;
Expand All @@ -412,7 +401,6 @@ function uploadSliceList(params, cb) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
SliceSize: SliceSize,
FileSize: FileSize,
PartNumber: PartNumber,
Expand Down Expand Up @@ -456,7 +444,6 @@ function uploadSliceItem(params, callback) {
var Bucket = params.Bucket;
var Region = params.Region;
var Key = params.Key;
var AppId = params.AppId;
var FileSize = params.FileSize;
var FileBody = params.Body;
var PartNumber = params.PartNumber * 1;
Expand Down Expand Up @@ -486,7 +473,6 @@ function uploadSliceItem(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
ContentLength: ContentLength,
ContentSha1: ContentSha1,
PartNumber: PartNumber,
Expand Down Expand Up @@ -514,7 +500,6 @@ function uploadSliceComplete(params, callback) {
var Bucket = params.Bucket;
var Region = params.Region;
var Key = params.Key;
var AppId = params.AppId;
var UploadId = params.UploadId;
var SliceList = params.SliceList;
var self = this;
Expand All @@ -529,7 +514,6 @@ function uploadSliceComplete(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
UploadId: UploadId,
Parts: Parts
}, function (err, data) {
Expand All @@ -551,7 +535,6 @@ function abortUploadTask(params, callback) {
var Bucket = params.Bucket;
var Region = params.Region;
var Key = params.Key;
var AppId = params.AppId;
var UploadId = params.UploadId;
var Level = params.Level || 'task';
var AsyncLimit = params.AsyncLimit;
Expand All @@ -569,7 +552,6 @@ function abortUploadTask(params, callback) {
Bucket: Bucket,
Region: Region,
Key: Key,
AppId: AppId,
AsyncLimit: AsyncLimit,
AbortArray: AbortArray
}, function (err, data) {
Expand Down
Loading

0 comments on commit b915a89

Please sign in to comment.