@nger/fk-upload 1.0.33 → 1.0.34

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.
@@ -168,7 +168,7 @@ let TaskService = class TaskService {
168
168
  const isShouldRunning = isComplete || (!isComplete && task.index == taskIndex);
169
169
  if (isShouldRunning) {
170
170
  // should handler
171
- const fileStream = (0, fs_extra_1.createReadStream)(task.path, { start: task.start, end: task.end });
171
+ const fileStream = (0, fs_extra_1.createReadStream)(task.path, { start: task.start, end: task.end, encoding: 'utf8' });
172
172
  const formdata = new form_data_1.default();
173
173
  formdata.append('ctrl', fileStream);
174
174
  formdata.append('isFreeVer', this.encodeURIComponent(false));
@@ -379,12 +379,12 @@ let TaskService = class TaskService {
379
379
  const { delayTime, splitSize, uploadedSize } = data;
380
380
  const uploadUrl = this.getUploadUrl(accessToken, false);
381
381
  const totalChunks = Math.ceil((task.totalSize) / splitSize);
382
- let start = uploadedSize + 1;
382
+ let start = uploadedSize;
383
383
  let index = Math.ceil(uploadedSize / splitSize);
384
384
  let complete = false;
385
385
  this.beginUploadTask(task.filename);
386
386
  do {
387
- const maxEndSize = start + 1 + splitSize;
387
+ const maxEndSize = start + splitSize;
388
388
  if (index >= totalChunks - 1 || maxEndSize >= task.totalSize) {
389
389
  complete = true;
390
390
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",