@nger/fk-upload 1.0.21 → 1.0.24
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.
@@ -170,7 +170,6 @@ let TaskService = class TaskService {
|
|
170
170
|
formdata.append('isFreeVer', 'false');
|
171
171
|
formdata.append('aid', `${task.aid}`);
|
172
172
|
formdata.append('folderId', `${task.folderId}`);
|
173
|
-
console.log(task.filename);
|
174
173
|
formdata.append('fileName', task.filename);
|
175
174
|
formdata.append(`totalSize`, `${task.total}`);
|
176
175
|
formdata.append(`fileMd5`, task.fileMd5);
|
@@ -204,6 +203,20 @@ let TaskService = class TaskService {
|
|
204
203
|
// fullDownUrl
|
205
204
|
const downUrl = data.fullDownUrl;
|
206
205
|
if (downUrl) {
|
206
|
+
const fullUrl = downUrl.startsWith('http') ? downUrl : `https:` + downUrl;
|
207
|
+
console.log(data);
|
208
|
+
axios_1.default.post(`https://smr00.vip.webportal.top/ajax/advanceUpload.jsp?cmd=_report&_TOKEN=${task.token}`, this.encodeURIComponent({
|
209
|
+
type: 1,
|
210
|
+
size: task.total,
|
211
|
+
time: NaN,
|
212
|
+
flag: true,
|
213
|
+
name: task.filename
|
214
|
+
}), {
|
215
|
+
headers: {
|
216
|
+
[`Content-Type`]: `application/x-www-form-urlencoded; charset=UTF-8`,
|
217
|
+
Cookie: task.cookies
|
218
|
+
}
|
219
|
+
});
|
207
220
|
this.redis.del(task.filename);
|
208
221
|
this.ws.send({
|
209
222
|
action: `@nger/fk-upload/uploading`,
|
@@ -211,17 +224,17 @@ let TaskService = class TaskService {
|
|
211
224
|
uploadSize: task.end,
|
212
225
|
filename: task.filename,
|
213
226
|
total: task.total,
|
214
|
-
uploadUrl:
|
227
|
+
uploadUrl: fullUrl
|
215
228
|
}
|
216
229
|
});
|
217
230
|
this.addEffectTask({
|
218
231
|
filename: task.filename,
|
219
|
-
uploadUrl:
|
232
|
+
uploadUrl: fullUrl,
|
220
233
|
topicId: task.topicId
|
221
234
|
});
|
222
235
|
this.db.manager.update(entities_1.FkDownloadTaskEntity, task.filename, {
|
223
236
|
status: 2,
|
224
|
-
uploadUrl:
|
237
|
+
uploadUrl: fullUrl,
|
225
238
|
uploadSize: task.total
|
226
239
|
}).then(() => complete()).catch(() => fail());
|
227
240
|
}
|
@@ -379,7 +392,8 @@ let TaskService = class TaskService {
|
|
379
392
|
totalChunks: totalChunks,
|
380
393
|
splitSize,
|
381
394
|
complete,
|
382
|
-
topicId: task.topicId
|
395
|
+
topicId: task.topicId,
|
396
|
+
token: token
|
383
397
|
});
|
384
398
|
index = index + 1;
|
385
399
|
start = endSize;
|