@nger/fk-upload 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,8 +60,7 @@ let TaskService = class TaskService {
|
|
60
60
|
this.redis.set(filename, `0`);
|
61
61
|
}
|
62
62
|
async addEffectTask(task) {
|
63
|
-
// const content = Buffer.from(JSON.stringify(task));
|
64
|
-
// await this.rabbit.send('@nger/fk-upload/effect-task', content)
|
63
|
+
// const content = Buffer.from(JSON.stringify(task)); // await this.rabbit.send('@nger/fk-upload/effect-task', content)
|
65
64
|
}
|
66
65
|
async addScheduleTask(task) {
|
67
66
|
const content = Buffer.from(JSON.stringify(task));
|
@@ -380,12 +379,12 @@ let TaskService = class TaskService {
|
|
380
379
|
const { delayTime, splitSize, uploadedSize } = data;
|
381
380
|
const uploadUrl = this.getUploadUrl(accessToken, false);
|
382
381
|
const totalChunks = Math.ceil((task.totalSize) / splitSize);
|
383
|
-
let start = uploadedSize;
|
382
|
+
let start = uploadedSize + 1;
|
384
383
|
let index = Math.ceil(uploadedSize / splitSize);
|
385
384
|
let complete = false;
|
386
385
|
this.beginUploadTask(task.filename);
|
387
386
|
do {
|
388
|
-
const maxEndSize = start + splitSize;
|
387
|
+
const maxEndSize = start + 1 + splitSize;
|
389
388
|
if (index >= totalChunks - 1 || maxEndSize >= task.totalSize) {
|
390
389
|
complete = true;
|
391
390
|
}
|