Skip to content

Commit

Permalink
feat/uploadId
Browse files Browse the repository at this point in the history
  • Loading branch information
livehigh committed Jun 3, 2021
1 parent a32b890 commit 023261a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/advance.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,18 @@ function sliceUploadFile(params, callback) {
// 上传过程中出现错误,返回错误
ep.on('error', function (err) {
if (!self._isRunningTask(TaskId)) return;
return callback(err);
var _err = util.extend({
UploadId: params.UploadData.UploadId || ''
}, err);
return callback(_err);
});

// 上传分块完成,开始 uploadSliceComplete 操作
ep.on('upload_complete', function (UploadCompleteData) {
callback(null, UploadCompleteData);
var _UploadCompleteData = util.extend({
UploadId: params.UploadData.UploadId || ''
}, UploadCompleteData);
callback(null, _UploadCompleteData);
});

// 上传分块完成,开始 uploadSliceComplete 操作
Expand Down

0 comments on commit 023261a

Please sign in to comment.