@nger/fk-upload 1.0.52 → 1.0.53

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.
@@ -154,6 +154,17 @@ let FkService = class FkService {
154
154
  complete = true;
155
155
  break;
156
156
  }
157
+ if (uploadResult.code !== 200) {
158
+ console.log(uploadResult);
159
+ const info = await this.getUploadInfo(task.loginId, task.filename, task.fileMd5, task.total);
160
+ task.cookies = info.cookies;
161
+ task.splitSize = info.splitSize;
162
+ task.start = info.uploadedSize;
163
+ task.uploadUrl = info.uploadUrl;
164
+ task.index = Math.ceil(info.uploadedSize / info.splitSize);
165
+ await this.uploadFile(task);
166
+ return;
167
+ }
157
168
  if (uploadResult) {
158
169
  const data = uploadResult.data;
159
170
  const downUrl = data.path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nger/fk-upload",
3
- "version": "1.0.52",
3
+ "version": "1.0.53",
4
4
  "description": "",
5
5
  "main": "dist/core.js",
6
6
  "types": "dist/core.d.ts",